Macro SchedulerWindows Automation Made Easy© 2015 MJT Net LtdAll rights reserved. No parts of this work may be reproduced in any form or by any means-
Macro SchedulerIX© 2015 MJT Net Ltd...
89 Macro Scheduler© 2015 MJT Net Ltdnormally or for docking. DragMode Determines how the control initiates drag-and-drop ordrag-and-dock operations. E
90Command Reference© 2015 MJT Net LtdVisible Determines whether the component appearsonscreen. Width Specifies the horizontal size of the control or f
91 Macro Scheduler© 2015 MJT Net Ltdvertically or horizontally. ParentCustomHint Determines where a control looks for its custom hint. ParentDoubleBuf
92Command Reference© 2015 MJT Net LtdDragCursor Indicates the image used to represent the mousepointer when the control is being dragged. DragKind Spe
93 Macro Scheduler© 2015 MJT Net LtdTag Stores an integer value as part of a component. Top Specifies the Y coordinate of the top left corner of acont
94Command Reference© 2015 MJT Net Ltdinformation. ParentShowHint Determines where a control looks to find out if its HelpHint should be shown. PopupMe
95 Macro Scheduler© 2015 MJT Net Ltdbitmap first. DragCursor Indicates the image used to represent the mousepointer when the control is being dragged.
96Command Reference© 2015 MJT Net LtdUseDockManager Specifies whether the docking manager is used indrag-and-dock operations. VerticalAlignment Sets t
97 Macro Scheduler© 2015 MJT Net Ltd4.7.1.18 StatusBar Object PropertiesName Description Action Designates the action associated with the control. Ali
98Command Reference© 2015 MJT Net Ltdcontrol. ShowHint Determines whether the control displays a Help Hintwhen the mouse pointer rests momentarily on
XContents© 2015 MJT Net Ltd...
99 Macro Scheduler© 2015 MJT Net Ltdbitmap first.DragCursor Specifies the image used to represent the mousepointer when the control is being dragged.D
100Command Reference© 2015 MJT Net LtdRowCount Specifies the number of rows in the grid.SaveToCSVSavest the grid to a CSV data string.ScrollBars Speci
101 Macro Scheduler© 2015 MJT Net LtdImageIndex Indicates which image maintained by the parent menuappears next to the menu item. LoadBitmapLoads bitm
102Command Reference© 2015 MJT Net Ltd4.7.2.1 CloseDialogCloseDialog>DialogNameNot supported in Macro Scheduler Lite.Closes non-modal dialog specif
103 Macro Scheduler© 2015 MJT Net LtdMarks the end of a dialog block. See Dialog for details.4.7.2.4 GetDialogActionGetDialogAction>DialogName,Re
104Command Reference© 2015 MJT Net LtdExample:RGB>20,50,200,aColorSetDialogObjectColor>Dialog1,,aColor4.7.2.8 SetDialogObjectFontSetDialogObject
105 Macro Scheduler© 2015 MJT Net LtdSetDialogObjectFocus>Dialog1,msMemo24.7.2.10 SetDialogObjectVisibleSetDialogObjectVisible>Dialog_Name,Objec
106Command Reference© 2015 MJT Net LtdTo see a list of available property names edit the dialog in the Dialog Designer and select the control. The pro
107 Macro Scheduler© 2015 MJT Net LtdFor the dialog's own events, leave ObjectName blank.For a list of possible event names edit the dialog in th
108Command Reference© 2015 MJT Net Ltdhttp://en.wikipedia.org/wiki/Modal_windowNon-Modal WindowsSo a non-modal window is the opposite. While it is act
Using Macro SchedulerPartI
109 Macro Scheduler© 2015 MJT Net LtdTo display a dialog non-modally specify the Show function without a result variable. E.g.:Show>MyDialogSince
110Command Reference© 2015 MJT Net LtdAbbreviation: XLCSee also: XLAddSheet , XLDelCol , XLDelRow , XLDelSheet , XLGetCell ,XLGetSheetDims , XLOpen ,
111 Macro Scheduler© 2015 MJT Net LtdXLOpen>%USERDOCUMENTS_DIR%\mybook.xls,1,xlBookXLDelRow>xlBook,Sheet1,3XLSave>xlBook,%USERDOCUMENTS_DIR%\
112Command Reference© 2015 MJT Net Ltd4.8.7 XLGetSheetDimsXLGetSheetDims>XLBookHandle,SheetName,MaxRows,MaxColsNot supported in Macro Scheduler Lit
113 Macro Scheduler© 2015 MJT Net Ltd4.8.9 XLQuitXLQuit>XLBookHandleNot supported in Macro Scheduler Lite.This function requires Microsoft Excel to
114Command Reference© 2015 MJT Net Ltdvalue to an xlFileFormat enumerator. Abbreviation: XLSSee also: XLAddSheet , XLCreate , XLDelCol , XLDelRow , X
115 Macro Scheduler© 2015 MJT Net Ltd.xlsx files, export to .xls first.The array takes the format:arrayname_row_colarrayname_row_countarrayname_countE
116Command Reference© 2015 MJT Net Ltd4.9.2 ChangeDirectoryChangeDirectory>pathChanges the current directory to the directory specified in path. p
117 Macro Scheduler© 2015 MJT Net Ltdsourcepath, and destinationpath may be variables. Wildcards can be used. Source and destinationmay be folders.B
118Command Reference© 2015 MJT Net Ltd4.9.6 CountFilesCountFiles>file_spec,result,subdir_flagReturns the number of files matching file_spec in the
2Using Macro Scheduler© 2015 MJT Net Ltd1 Using Macro Scheduler1.1Getting StartedWhen Macro Scheduler starts it places its icon in the system tray (ne
119 Macro Scheduler© 2015 MJT Net LtdCSV Data:ID,Date,Value1,28/02/2010,502,01/03/2010,75Code:CSVFileToArray>c:\myfile.csv,csvDataArray:csvData_1_c
120Command Reference© 2015 MJT Net Ltdpath can be a variable. Wildcards can be used.The outcome of the operation will be reported in variables CF_RES
121 Macro Scheduler© 2015 MJT Net Ltd4.9.12 FileDateFileDate>filename,resultReturns the file date of filename in the result variable.The date retur
122Command Reference© 2015 MJT Net Ltd4.9.15 GetFileListGetFileList>filespec,result[,delimiter]GetFileList returns a list of the files found matchi
123 Macro Scheduler© 2015 MJT Net Ltd//gets the newest file in the My Documents folderGetNewestFile>%USERDOCUMENTS_DIR%\*.*,newFile//gets the newes
124Command Reference© 2015 MJT Net Ltd4.9.19 IfFileChangedIfFileChanged>filename,range[,label_name[,false_label_name]]statements [ [Elseelse sta
125 Macro Scheduler© 2015 MJT Net Ltd4.9.21 IfNotDirExistsIfNotDirExists>directory_name[,label_name[,false_label_name]]statements [ [Elseelse st
126Command Reference© 2015 MJT Net LtdEndif4.9.23 IfNotFileExistsIfNotFileExists>filename[,label_name[,false_label_name]]statements [ [Elseelse
127 Macro Scheduler© 2015 MJT Net LtdExampleMoveFile>c:\temp\myfile.txt,c:\temp\myfile.bakOr with variables:Let>filename=c:\temp\myfile.txtLet&g
128Command Reference© 2015 MJT Net LtdSee also: ReadFile , WriteLnExampleThis example reads each line from the text file and displays it in a Message
3 Macro Scheduler© 2015 MJT Net Ltd1.2Menu CommandsFileNew MacroNew Macro From TemplateEdit MacroImport MacrosHideExitEditDeleteRemove from GroupRenam
129 Macro Scheduler© 2015 MJT Net Ltd WriteLn will then output Unicode. If the file already exists WriteLn will detect the file's encoding andus
130Command Reference© 2015 MJT Net Ltd4.10FTP/HTTP/Telnet/Email Commands4.10.1 FTPDelFileFTPDelFile>Server,Username,Password,port,Host_File_SpecNot
131 Macro Scheduler© 2015 MJT Net Ltd4.10.2 FTPGetDirListFTPGetDirList>Server,Username,Password,port,Local_File,Host_Dir,Host_File_Spec,TypeNot sup
132Command Reference© 2015 MJT Net LtdFTPGetDirList>ftp.domain.com,anonymous,[email protected],21,c:\temp\readme.txt,/,*,D4.10.3 FTPGetFileFTPGetFile
133 Macro Scheduler© 2015 MJT Net Ltd0No TLS/SSLSupportDefault - no encryption1Use Implicit TLSYou wish to use implicit TLS. In implicit TLS FTP, you
134Command Reference© 2015 MJT Net Ltdhttp://www.openssl.org/related/binaries.htmlFor TLS/SSL support set FTP_USETLS to one of the following values:0N
135 Macro Scheduler© 2015 MJT Net LtdFTP_TIMEOUT variable.TLS/SSL SupportTo use TLS/SSL you will first need to install the OpenSSL libraries. See:htt
136Command Reference© 2015 MJT Net LtdBy default the timeout for the FTP commands is set to 15 seconds. To change this set theFTP_TIMEOUT variable.Ab
137 Macro Scheduler© 2015 MJT Net LtdAbbreviation : FRFSee also FTPGetFile , FTPPutFile , FTPDelFile , FTPGetDirListTLS/SSL SupportTo use TLS/SSL you
138Command Reference© 2015 MJT Net Ltdif only files are being posted.By default there is no timeout for the HTTPRequest command and requests will wait
4Using Macro Scheduler© 2015 MJT Net Ltd1.3Toolbar The top row of the toolbar contains the menu and buttons to Run , Stop and Recordmacros.Buttons fr
139 Macro Scheduler© 2015 MJT Net Ltd4.10.10 IEGetTagsIEGetTags>URL,Tagname,ReturnType,ArrayVarThis function will return an array of tag values for
140Command Reference© 2015 MJT Net Ltd4.10.11 IEGetTagsByAttribIEGetTagsByAttrib>URL,Tagname,Attrib=Value,ReturnType,ArrayVarThis function will ret
141 Macro Scheduler© 2015 MJT Net LtdValue: To set the value of an input field specify the new value here.To determine the Index look at the source of
142Command Reference© 2015 MJT Net Ltd4.10.14 IEWaitIEWait>urlWaits until the IE browser window matching the specified URL is no longer reporting b
143 Macro Scheduler© 2015 MJT Net LtdMessageModal>POP3_RESULTSeparate>POP3_MSGFILES,;,MsgFilesMessageModal>Files Downloaded: %MsgFiles_count%
144Command Reference© 2015 MJT Net LtdExampleLet>SENDMAIL_STATUS=1Let>subject=Test MessageLet>[email protected]>myname=Mr SmithLet&
145 Macro Scheduler© 2015 MJT Net LtdSee also: TelnetClose , TelnetSend , TelnetWaitForExampleTelnetConnect>my.domain.com,23,hTNTelnetWaitFor>hT
146Command Reference© 2015 MJT Net LtdWaits for text in a Telnet session. Specify a session ID returned by a call to TelnetConnect . Enter a timeout
147 Macro Scheduler© 2015 MJT Net LtdSimple expressions can contain only two parts separated by one of the following operators:= Equals> Greater th
148Command Reference© 2015 MJT Net LtdAbbreviation : IFDSee also: Label , Goto , IfWindowOpen , IfFileChanged , If , IfFileExists ,SubroutinesExampleI
5 Macro Scheduler© 2015 MJT Net LtdIn this example an existing script was selected to be edited. If 'New' had been pressed then this formwou
149 Macro Scheduler© 2015 MJT Net LtdElse and Endif are ignored and are unnecessary. Abbreviation : IFESee also: Label , Goto , IfWindowOpen , IfFileC
150Command Reference© 2015 MJT Net Ltd4.11.7 IfNotFileChangedIfNotFileChanged>filename,range[,label_name[,false_label_name]]statements [ [Elseel
151 Macro Scheduler© 2015 MJT Net LtdEndif4.11.9 IfNotWindowOpenIfNotWindowOpen>window_title[,label_name[,false_label_name]]statements [ [Elseel
152Command Reference© 2015 MJT Net LtdIfWindowOpen>Notepad - [Untitled],donotepad...Label>donotepador, with a wildcard :IfWindowOpen>notepad
153 Macro Scheduler© 2015 MJT Net Ltdfor supported image types).haystack can be set to one of the following values:1. A bitmap/png file (e.g. %SCRIPT_
154Command Reference© 2015 MJT Net Ltd7Middle left8Middle rightX_Array is the name of an array to store the X coordinates of each match. If using CCO
155 Macro Scheduler© 2015 MJT Net Ltd4.12.4 GetRectCheckSumGetRectCheckSum>TLX,TLY,BRX,BRY,result_valueWhen passed the top left and bottom right sc
156Command Reference© 2015 MJT Net Ltd4.12.6 ScreenCaptureScreenCapture>X1,Y1,X2,Y2,FilenameNot supported in Macro Scheduler Lite.Captures a portio
157 Macro Scheduler© 2015 MJT Net Ltd4.12.8 WaitRectChangedWaitRectChanged>TLX,TLY,BRX,BRY,TimeoutThis command causes Macro Scheduler to wait until
158Command Reference© 2015 MJT Net LtdSee also: CompareBitmaps , FindImagePos , ScreenCapture , GetScreenResExampleWaitScreenImage>d:\today_button.
6Using Macro Scheduler© 2015 MJT Net LtdThe Import button allows you to load in a script that has already been created. This is useful if youhave a nu
159 Macro Scheduler© 2015 MJT Net LtdSee also: CapsOff4.13.4 NumOffSwitches Num lock off. If Num lock is already off, no action is taken. If Num lo
160Command Reference© 2015 MJT Net LtdExample://Send text directly to NotepadGetWindowHandle>Untitled - Notepad,hWndParentFindObject>hWndParent,
161 Macro Scheduler© 2015 MJT Net LtdPress LShift} Left/Right Shift KeyRelease LShift} ONLY in Windows NT and laterPress RShift} you can distinguish s
162Command Reference© 2015 MJT Net LtdPress ALTSend Character/Text>FXRelease ALTBy setting PRESS_ALLOWVARS to 1, Release can accept a variable name
163 Macro Scheduler© 2015 MJT Net LtdNote that this command sends keystrokes and therefore any keys sent will be subject to the currentstate of modifi
164Command Reference© 2015 MJT Net LtdSee also: While , RepeatExampleLet>x=0While>x<10 Let>x=x+1 MessageModal>xEndWhile4.14.2 GosubGo
165 Macro Scheduler© 2015 MJT Net Ltd4.14.3 GotoGoto>Label_NameCauses execution to continue at the specified label, missing any commands in between
166Command Reference© 2015 MJT Net Ltd4.14.5 RepeatRepeat>variableUse in conjunction with Until. Iterates the code from the Repeat statement to th
167 Macro Scheduler© 2015 MJT Net Ltd //this bit still gets executed Let>y=xEND>ExampleSubroutineLabel>EndScriptMessageModal>y4.14.7 Unt
168Command Reference© 2015 MJT Net LtdSee also: EndWhile , RepeatExampleLet>x=0While>x<10 Let>x=x+1 MessageModal>xEndWhile4.15Message
7 Macro Scheduler© 2015 MJT Net LtdEnable/disable Macro backup, and select how many copies to keep.To access your backupsBackups will be created each
169 Macro Scheduler© 2015 MJT Net LtdINPUT_PASSWORD variable to 1. Set to zero for default behaviour.It is possible to set a timeout by setting the v
170Command Reference© 2015 MJT Net Ltd4.15.4 MessageModalMessageModal>message_textDisplays a message box containing the text specified in message_t
171 Macro Scheduler© 2015 MJT Net Ltd...SRT>DoTrayClick Show>Dialog1,resEnd>DoTrayClick4.16.2 AddTrayIconAddTrayIcon>IconFileName,Name,Hi
172Command Reference© 2015 MJT Net Ltd4.16.4 ArrayDimArrayDim>array_name,num_elementsCreates an empty array with specified number of elements. If
173 Macro Scheduler© 2015 MJT Net LtdExample:ColorToRGB>6554367,r,g,bMessageModal>%r%,%g%,%b%4.16.7 DelArrayDelArray>array_name,[,suffixforma
174Command Reference© 2015 MJT Net Ltd4.16.10 BlockInputBlockInput>blockBlockinput prevents or enables keyboard and mouse input from the user.Set b
175 Macro Scheduler© 2015 MJT Net LtdSee also: SetEnvVarExample:GetEnvVar>TMP,myTMPDirMessageModal>myTMPDir4.16.13 KillProcessKillProcess>pro
176Command Reference© 2015 MJT Net LtdLibFunc can be used to call DLL functions and is therefore an ideal way of extending the languageusing custom DL
177 Macro Scheduler© 2015 MJT Net LtdLet>used=spacefree_3/1024Let>free=spacefree_4/1024MessageModal> Disk space used: %used%Kb %CRLF% Free sp
178Command Reference© 2015 MJT Net LtdAbbreviation : LLDSee also: LibFunc , LibFreeExamplesLibLoad>user32,hDllLet>WIN_USEHANDLE=1GetActiveWindow
8Using Macro Scheduler© 2015 MJT Net Ltdon.From the Script Editor, click Tools, View BackupsA list of backups will be presented. Double click a backup
179 Macro Scheduler© 2015 MJT Net Ltditem selected by the user.X and Y take a screen X,Y positionItemList is a semi-colon delimited list of captionsre
180Command Reference© 2015 MJT Net LtdExampleLet>url=http://ip.jsontest.com//*python_code:import urllib2import json# grab data from http://ip.jsont
181 Macro Scheduler© 2015 MJT Net Ltd4.16.24 RGBRGB>red,green,blue,resultCreates a color code based on the specified mix of red, green and blue int
182Command Reference© 2015 MJT Net Ltd4.16.27 WaitProcessExistsWaitProcessExists>processnameWaits for the specified process name to exist. The sys
183 Macro Scheduler© 2015 MJT Net LtdUsually this is desirable (32 bit processes cannot load 64 bit DLLs) and there are 32 bit equivalentsfor almost a
184Command Reference© 2015 MJT Net Ltd4.17.2 GetCursorPosGetCursorPos>X,Y[,cursorType]Returns the X and Y coordinates of the current mouse cursor p
185 Macro Scheduler© 2015 MJT Net Ltd4.17.5 LDownSimulates a press of the left mouse button. This is like pressing the mouse button down but notrelea
186Command Reference© 2015 MJT Net Ltd, MUp , MClick , MouseMove , MouseMoveRel , MouseOver4.17.9 MDownSimulates a press of the middle mouse button.
187 Macro Scheduler© 2015 MJT Net Ltd, RDblClick , MouseOverExampleIf position 40,50 is a point relative to the current window, on a button, the follo
188Command Reference© 2015 MJT Net Ltd4.17.14 RClickSimulates a right button mouse click at the current point on the screen.The following commands wil
Macro SchedulerI© 2015 MJT Net LtdTable of ContentsPart I Using Macro Scheduler2...
9 Macro Scheduler© 2015 MJT Net LtdTo open a backup in a new editor tab double click it or right click and select "Open in Editor Tab". To o
189 Macro Scheduler© 2015 MJT Net Ltd4.17.18 ToolbarToolbar>window_title,toolbar_index,button_indexNB: This function does not work in Windows 95Pos
190Command Reference© 2015 MJT Net LtdExampleLet>Counter=5Add>Counter,2i.e. Counter=Counter+2In this example the numeric variable, Counter, is g
191 Macro Scheduler© 2015 MJT Net LtdLet>MyVal={Upper("WorLd")}Let>MyVal={5 * 10 + 25}Let>d={%a%+%b%*%c%-23} 4.18.3 SetRoundModeSet
192Command Reference© 2015 MJT Net Ltd4.19Registry Functions4.19.1 RegistryDelKeyRegistryDelKey>root_key,keyNot supported in Macro Scheduler Lite.R
193 Macro Scheduler© 2015 MJT Net LtdSee also: RegistryDelKey , RegistryDelVal , RegistryReadKey , RegistryWriteKey ,RegistryEnumValsExample:RegistryE
194Command Reference© 2015 MJT Net Ltdvalue assigned to the entry. If the key and entry already exist, the value is changed to the valueprovided. Th
195 Macro Scheduler© 2015 MJT Net Ltd This only works for GUI applications and may not be appropriate for all applications. Someapplications may appe
196Command Reference© 2015 MJT Net LtdTo open Notepad :RunProgram>notepad.exeA path may be specified if necessary :RunProgram>c:\my programs\eud
197 Macro Scheduler© 2015 MJT Net Ltd Press F4 Release ALTEnd>CloseApp4.21.1.2 SRTSRT>Subroutine_NameIdentifies the start of a Subroutine bl
198Command Reference© 2015 MJT Net Ltd4.21.1.3 ENDEND>Subroutine_NameIdentifies the end of a Subroutine block. Use SRT to start the subroutine.Su
10Using Macro Scheduler© 2015 MJT Net LtdArraysExplicit Variable Resolution - VAREXPLICITIgnoring Spaces - IGNORESPACESSystem VariablesVariable Explor
199 Macro Scheduler© 2015 MJT Net Ltd If>x=5 SkipLabel>EndScript Endif //this bit still gets executed Let>y=xEND>ExampleSubroutineL
200Command Reference© 2015 MJT Net LtdExit>04.21.5 GotoGoto>Label_NameCauses execution to continue at the specified label, missing any commands
201 Macro Scheduler© 2015 MJT Net LtdSeveral types of operators and functions can be used with complex expressions. For more detailssee Complex Expre
202Command Reference© 2015 MJT Net Ltd4.21.8 IncludeInclude>scriptfileIncludes code from an external script file. The code is executed and made av
203 Macro Scheduler© 2015 MJT Net LtdExampleLabel>Start...Goto>SecondBit...Label>SecondBit..4.21.11 LetLet>variable_name=valueLet is use
204Command Reference© 2015 MJT Net LtdName would now equal John SmithLet>MyVal={Upper("WorLd")}Let>MyVal={5 * 10 + 25}Let>d={%a%+%b
205 Macro Scheduler© 2015 MJT Net LtdTOPENSee IfWindowOpen for window title & WF_TYPEsyntax.WINDOW_NEWACTIVE00Triggers when the foreground window
206Command Reference© 2015 MJT Net Ltd8: Windows key must also be pressedDIALOG_EVENTEventParm is the dialog name. ExtraParm is a modal result value
207 Macro Scheduler© 2015 MJT Net LtdOnEvent>CUSTOM,MyTriggerSub,DoIT,DoSomethingLabel>start Wait>1 If>NotepadOpen=1 Message>Notep
208Command Reference© 2015 MJT Net Ltd4.21.14 RemarkRemark>Some CommentThe remark statement is ignored by the interpreter. It exists simply to all
11 Macro Scheduler© 2015 MJT Net LtdThe following wizards exist:Image Recognition WizardKeyboard WizardSend Keys to Object WizardMouse Action WizardTe
209 Macro Scheduler© 2015 MJT Net Ltd4.21.16 UntilUntil>variable,finalvalueUse in conjunction with Repeat. Iterates the code from the Repeat state
210Command Reference© 2015 MJT Net Ltdkeyboard, show window, and optionally, paint events. Issue 1 to include paint events, and 0 toexclude paint eve
211 Macro Scheduler© 2015 MJT Net LtdUses AES encryption to encrypt or decrypt source to target using the specified password which isSHA256 hashed by
212Command Reference© 2015 MJT Net Ltd..ReadLn>d:\test.txt,1,ascii_cryptvalBase64>ascii_cryptval,DECODE,bin_cryptvalCrypt>abc,bin_cryptval,cl
213 Macro Scheduler© 2015 MJT Net Ltd//Encode with Base64Base64>encdata,ENCODE,encdata//Write to the fileWriteLn>file,r,encdata//To read the dat
214Command Reference© 2015 MJT Net LtdExample:Let>filename=c:\users\documents\somefile.doc//path_only will contain "c:\users\documents"Ex
215 Macro Scheduler© 2015 MJT Net Ltd//MoneyLet>data=134.647Format>Price: %m,data,result//Result becomes: "Price: $134.65" (currency s
216Command Reference© 2015 MJT Net LtdExampleHTTPRequest>http://ip.jsontest.com/,,GET,,JSONJSONParse>JSON,ip,myIPMessageModal>Your pubic IP i
217 Macro Scheduler© 2015 MJT Net Ltdselect id, forename, surnamefrom customerswheresurname = '%strSurname%'*/4.22.14 LengthLength>string
218Command Reference© 2015 MJT Net LtdIn the following example, the variable somevalue becomes equal to 'Happy' :MidStr>Happy Birthday,1,
12Using Macro Scheduler© 2015 MJT Net Ltd1.10Code Folding and BookmarksThe Macro Scheduler script editor supports various advanced editing features su
219 Macro Scheduler© 2015 MJT Net LtdLet>pattern=(\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b)RegEx>pattern,text,0,matches,num,0MessageModal>match
220Command Reference© 2015 MJT Net LtdAbbreviation: RPLSee also: RegEx , Position , MidStrExamplesLet>string=Your name is "Fred"StringRep
221 Macro Scheduler© 2015 MJT Net LtdLabelToVar>XML,sXMLXMLParse>sXML,/bookstore/book,val,numBooksLet>k=0Repeat>k Let>k=k+1 XMLParse&
222Command Reference© 2015 MJT Net Ltd4.23.1 GetControlTextGetControlText>WindowTitle,ClassName,Instance,ResultReturns the text of the control spec
223 Macro Scheduler© 2015 MJT Net LtdGetTextAtPoint>200,400,strText,nCharif>nChar>-1 MidStr>strText,nChar,1,sCharEndifMessageModal>%st
224Command Reference© 2015 MJT Net Ltd4.23.5 GetTextPosGetTextPos>text_to_find,left,top,right,bottomSearches the screen for the specified text and
225 Macro Scheduler© 2015 MJT Net LtdExampleGetWindowText>Document - WordPad,WordPadText4.23.8 GetWindowTextExGetWindowTextEx>window_title,textN
226Command Reference© 2015 MJT Net Ltd4.24VBScript Commands4.24.1 VBENDVBENDNot supported in Macro Scheduler Lite.Marks the end of a block of VBScript
227 Macro Scheduler© 2015 MJT Net Ltdwhich is a regular Macro Scheduler variable.This command sometimes causes confusion. As it is evaluating a VBScr
228Command Reference© 2015 MJT Net Ltd4.24.3 VBSTARTVBSTARTNot supported in Macro Scheduler Lite.Marks the start of a block of VBScript code. Macro S
13 Macro Scheduler© 2015 MJT Net Ltd Mark off the days on which you want the macro to run and enter a time. The time must be entered in24 hour notatio
229 Macro Scheduler© 2015 MJT Net LtdIt is possible to set the VBScript code timeout using the VBS_TIMEOUT variable. By defaultVBScript code will nev
230Command Reference© 2015 MJT Net Ltd'TEXT' : identifies the element by the element's innertext property. If element's innertext
231 Macro Scheduler© 2015 MJT Net Ltdvariable with subsequent IE functions to target the correct browser window.See also: WebRecorder FunctionsExample
232Command Reference© 2015 MJT Net Ltd4.25.6 IEExtractTagIEExtractTag>IE_Reference,Frame,Tagname,Index,All,ResultExtracts text from the specified t
233 Macro Scheduler© 2015 MJT Net Ltd4.25.8 IEExtractTagByNameIEExtractTagByName>IE_Reference,Frame,Tagname,Name_Or_ID,All,ResultExtracts text from
234Command Reference© 2015 MJT Net Ltd#INDEX#:n where n is the zero based index of the item. To select all items in a multi-select SELECTobject use #I
235 Macro Scheduler© 2015 MJT Net Ltd4.25.12 IEGetHWNDIEGetHWND>IE_Reference,ResultReturns the window handle of the specified IE instance.IE_Refere
236Command Reference© 2015 MJT Net LtdIEGetURL>IE[0],ie_handle4.25.15 IEGoBackIEGoBack>IE_Reference,ResultNavigates the given IE web browser ins
237 Macro Scheduler© 2015 MJT Net Ltd4.25.18 IEOnDownloadIEOnDownload>Enabled,Path,ResultEnables or disables Macro Scheduler's IE download man
238Command Reference© 2015 MJT Net Ltd4.25.20 IERefreshIERefresh>IE_Reference,ResultRefreshes the page - does the same as clicking the refresh butt
14Using Macro Scheduler© 2015 MJT Net LtdIf you choose to run a macro on the 5th of the month and also check the Friday box, the macro willrun every F
239 Macro Scheduler© 2015 MJT Net Ltd4.25.23 IEWaitIEWait>IE_Reference/URLWaits for the specified browser instance to no longer be busy by monitori
240Command Reference© 2015 MJT Net LtdIECreate>0,IE[0]IENavigate>%IE[0]%,www.somewhere.com/somefile.exe,ie_resLet>downloaded_filename=C:\Docu
241 Macro Scheduler© 2015 MJT Net Ltd4.25.28 IEWaitNewIEWaitNew>New_IE_ReferenceWaits for a new IE WebBrowser object to be created. This is needed
242Command Reference© 2015 MJT Net LtdAbbreviation : CloSee also: GetWindowPos , GetActiveWindowExampleCloseWindow>notepad*4.26.2 FindWindowWithTex
243 Macro Scheduler© 2015 MJT Net Ltd4.26.4 GetWindowChildListGetWindowChildList>parent_handle,child_listReturns a list of child objects/windows be
244Command Reference© 2015 MJT Net LtdAbbreviation: GWLExamples://Loop through a list of windowsGetWindowList>winlistSeparate>winlist,CRLF,windo
245 Macro Scheduler© 2015 MJT Net Ltd4.26.9 GetWindowPosGetWindowPos>window_title,X,YLocates the window specified in window_title and retrieves its
246Command Reference© 2015 MJT Net Ltdasterisk will force Macro Scheduler to only look for an exact match.A Regular Expression can be used in window_t
247 Macro Scheduler© 2015 MJT Net Ltdassociated with them cannot be retrieved with GetWindowText. Try the new GetTextAtPoint,GetTextInRect and GetWi
248Command Reference© 2015 MJT Net Ltd ...Endifor, with a wildcard :IfWindowOpen>notepad* ...Endif4.26.14 IfNotWindowOpenIfNotWindowOpen>windo
15 Macro Scheduler© 2015 MJT Net Ltdand you can specify a window title so that the macro starts when that window appears. See Advanced Scheduling Opt
249 Macro Scheduler© 2015 MJT Net Ltd4.26.16 ResizeWindowResizeWindow>window_title,new_width,new_heightResizes the window with the specified window
250Command Reference© 2015 MJT Net LtdSetFocus>window_title*First performs an exact case-sensitive match as above and if nothing found does a case-
251 Macro Scheduler© 2015 MJT Net Ltd4.26.19 WaitWindowChangedWaitWindowChanged>timeoutThis command causes Macro Scheduler to wait until the foregr
252Command Reference© 2015 MJT Net LtdAbbreviation : WWCSee also: Wait , WaitWindowOpen , WaitWindowChanged , WaitWindowFocused .ExamplesWaitWindowClo
253 Macro Scheduler© 2015 MJT Net LtdExamplesRun Program>c:\program files\msoffice\winword.exeWaitWindowFocused>microsoft word*//With timeout ch
254Command Reference© 2015 MJT Net LtdRun Program>c:\program files\msoffice\winword.exeWaitWindowOpen>microsoft word*//With timeout checkingLet&
255 Macro Scheduler© 2015 MJT Net Ltd4.27Window Objects4.27.1 FindObjectFindObject>parent_handle,ClassName,CaptionText,Instance,return_handle,X1,Y1
256Command Reference© 2015 MJT Net LtdSee also: SetCheckBoxExampleGetCheckBox>Internet Explorer Prop*,Never dial a &connection,resIf>res=1
257 Macro Scheduler© 2015 MJT Net LtdAbbreviation: GFO4.27.5 GetListItemGetListItem>WindowTitle,ClassName,Instance,Text,Column,Case,Partial,Result,
258Command Reference© 2015 MJT Net Ltd//Open Display PropertiesRun>rundll32 shell32.dll,Control_RunDLL Desk.cplWaitWIndowOpen>Display Properties
16Using Macro Scheduler© 2015 MJT Net Ltd1.13TriggerUnder the Trigger tab of the Macro Properties dialog you can specify a condition which should trig
259 Macro Scheduler© 2015 MJT Net Ltd//Assumes Windows Explorer is open at "My Documents" with//explorer bar showing FoldersGetTreeNode>M
260Command Reference© 2015 MJT Net Ltd4.27.8 SelectMenuSelectMenu>WindowTitle,MenuIndex[,SubMenuIndex[,SubMenuIndex[,...]]]Selects the menu item sp
261 Macro Scheduler© 2015 MJT Net LtdIf>res=1 SetCheckBox>Internet Explorer Prop*,Never dial a &connection,FALSEElse SetCheckBox>Intern
262Command Reference© 2015 MJT Net Ltdvalues (if any), positions and dimensions.Window title can be a full case sensitive title or case insensitive su
263 Macro Scheduler© 2015 MJT Net Ltd4.27.15 UIGetValueUIGetValue>Window Title,Object Name, Values,PositionsNot supported in Macro Scheduler Lite.R
264Command Reference© 2015 MJT Net LtdUI elements.Window title can be a full case sensitive title or case insensitive substring if followed by the &ap
265 Macro Scheduler© 2015 MJT Net LtdVariables can then be passed into other functions as one of the parameters. For example, assumingthe above Let c
266Command Reference© 2015 MJT Net LtdLet>k=2Message>Names_%k%Let>Names_%k%=LouiseArrays created by MacroScript functions are displayed in th
267 Macro Scheduler© 2015 MJT Net Ltddown" through the variable table hierarchy until a match is found. E.g. if we are at level 2 and thereis a
268Command Reference© 2015 MJT Net Ltdthat variable is used, otherwise just that literal value is used. Setting VAREXPLICIT to 1 stops thisbehaviour
17 Macro Scheduler© 2015 MJT Net Ltd IfWindowOpen>Calculator Let>MACRO_RESULT=TRUE Else Let>MACRO_RESULT=FALSE EndifEND>TriggerSR
269 Macro Scheduler© 2015 MJT Net LtdEndifMessageModal> Answer: %d%//With IGNORESPACES=1 do the following if you want leading/trailing spaces in as
270Command Reference© 2015 MJT Net LtdCRCarriage ReturnLFLine FeedCRLFCarriage Return, Line Feed Combination (to force a new line)TABTab characterSPA
271 Macro Scheduler© 2015 MJT Net LtdPOP3_STATUSUsed to sw itch off/on the RetrievePOP3 status w indowPOP3_PORTUsed to set the POP3 port (defaults to
272Command Reference© 2015 MJT Net Ltd4.28.7 Variable ExplorerThe variable explorer is activated from the Tools menu of the Script Editor, or by typin
Macro Scheduler273© 2015 MJT Net LtdIndex- % -% 9- * -*/ 208- / -/* 208// 208- _ -_DUMP_VARS 269- A -About 39Abs 55Add
Index 274© 2015 MJT Net LtdDates 62, 63DateStamp 64Day 64DayOfWeek 64DBClose 59DBConnect 60DBExec 60DBQuery 61DDE
Macro Scheduler275© 2015 MJT Net LtdGetClipBoard 58GetControlText 222, 256GetCursorPos 184GetDate 65GetDialogAction 103GetDialogPr
Index 276© 2015 MJT Net Ltd- L -Label 165, 202LabelToVar 216Large Buttons 34LCL 184LClick 184LDB 184LDblClick 184LDO 1
Macro Scheduler277© 2015 MJT Net LtdPUS 259push 259PushButton 259PutClipBoard 58PyExec 179Python 179- Q -quick launch 19Qu
Index 278© 2015 MJT Net LtdSMTP_RESULT 269SMTP_TIMEOUT 269SMTP_USERID 269SMTPSendMail 143SOF 162SON 162Sort 33sound 17
18Using Macro Scheduler© 2015 MJT Net LtdWhen Windows is logged out Macro Scheduler cannot run. Instead the Macro Scheduler Service willtake over sch
Macro Scheduler279© 2015 MJT Net LtdWPC 156WRC 157WRD 209WriteLn 128WSI_TIMEOUT 269WST_TIMEOUT 269WW_RESULT 269WW_TIMEOUT
IIContents© 2015 MJT Net Ltd...
19 Macro Scheduler© 2015 MJT Net LtdSimply check the "Encrypt This Macro" box and provide a password.The password must be entered twice to e
20Using Macro Scheduler© 2015 MJT Net Ltdalready in the specified path will be displayed in the group. If any macros are added to the folder atany ti
21 Macro Scheduler© 2015 MJT Net Ltdyour actions cause windows to appear and insert code to make sure the macro waits for thosewindows to appear befor
22Using Macro Scheduler© 2015 MJT Net Ltd1.22Creating Desktop ShortcutsYou can tell Macro Scheduler to create a shortcut for a macro by selecting the
23 Macro Scheduler© 2015 MJT Net Ltdcan again be stepped or run.Variable BreakpointsAllows you to set one or more variable values on which script exec
24Using Macro Scheduler© 2015 MJT Net LtdArrays will show (Array) after them. Double click on array variables to see their element values.You can mod
25 Macro Scheduler© 2015 MJT Net LtdSelect objects from the Objects bar to add to the dialog. Objects can be moved around and resized.Toolbar buttons
26Using Macro Scheduler© 2015 MJT Net LtdSimply use WebRecorder as you would a web browser. As you navigate around the web page youwill see code prod
27 Macro Scheduler© 2015 MJT Net LtdThis is useful for creating shortcuts and running Macro Scheduler scripts from other programs or frommacros create
28Using Macro Scheduler© 2015 MJT Net LtdScript URLsThe script file can also be an HTTP URL, so that you can run macros from the web:msched.exe http:/
Macro SchedulerIII© 2015 MJT Net LtdPart IV Command Reference54...
29 Macro Scheduler© 2015 MJT Net Ltdhttp://www.mjtnet.com/support.htmPlease also send bug reports, comments and suggestions via the above page.For hin
Menu CommandsPartII
31 Macro Scheduler© 2015 MJT Net Ltd2 Menu Commands2.1New MacroDisplays the Macro Properties window for creating a new macro.2.2New Macro From Templa
32Menu Commands© 2015 MJT Net Ltdalready exists it will be overwritten only if 'Overwrite on Collision' is checked.Please note: Import Macro
33 Macro Scheduler© 2015 MJT Net LtdIt is possible to create "Linked Groups". Linked Groups are designed for collaboration and sharing ofma
34Menu Commands© 2015 MJT Net Ltd2.16Grid LinesToggles the grid lines in the macro list on and off.2.17ListSwitches the macro list into list view, sho
35 Macro Scheduler© 2015 MJT Net LtdCreate ConsoleAppCompile IncludesCreates an EXE which runs as a console app and can write to STDOUTScripts referen
36Menu Commands© 2015 MJT Net LtdLicense.datThese files can be found in the Macro Scheduler program folder. Copy the above files to the samelocation
37 Macro Scheduler© 2015 MJT Net Ltd- Close the selected window - use this with caution.2.26OptionsDisplays the options dialog. Options are: Stop Run
38Menu Commands© 2015 MJT Net LtdDisable Scheduler while editing/debugging scriptsBy default schedules continue to occur while the editor/macro proper
IVContents© 2015 MJT Net Ltd...
39 Macro Scheduler© 2015 MJT Net Ltd2.33AboutDisplays the About dialog box. This is useful to determine which version of Macro Scheduler you areusing
Scripting Windows For BeginnersPartIII
41 Macro Scheduler© 2015 MJT Net Ltd3 Scripting Windows For Beginners3.1IntroductionMacro Scheduler provides a simple but powerful language for automa
42Scripting Windows For Beginners© 2015 MJT Net LtdF1 while a command is selected.3.5First StepsUsually, we'll already be familiar with the proce
43 Macro Scheduler© 2015 MJT Net LtdSo I've written some text and now I want tosave the document. Let's see what the keysequence is for thi
44Scripting Windows For Beginners© 2015 MJT Net Ltd3.6.1 Run NotepadThere are a number of ways to run Notepad. I expect most of us will use our mouse
45 Macro Scheduler© 2015 MJT Net LtdSend>This is line twoPress EnterSend>This is the third and final line.But let's be a bit cleverer. Let
46Scripting Windows For Beginners© 2015 MJT Net Ltd3.6.4 Press ALT-FAWhen we press the ALT key we will hold it down, send the other keys with it and t
47 Macro Scheduler© 2015 MJT Net LtdLet>filename=c:\my documents\sample.txtAssuming we have done this we could just now send the filename and press
48Scripting Windows For Beginners© 2015 MJT Net Ltd3.6.7 The Script So FarNote the variable 'filename' declared at the top. After running t
Macro SchedulerV© 2015 MJT Net Ltd...
49 Macro Scheduler© 2015 MJT Net LtdIf you close Notepad and run the script again the same thing will happen. No errors, because thefilename has been
50Scripting Windows For Beginners© 2015 MJT Net LtdWaitWindowOpen>NotepadWaitWindowClosed>NotepadDon't be tempted to just use a WaitWindowC
51 Macro Scheduler© 2015 MJT Net Ltd//Set the name of our fileLet>filename=c:\samplefile.txt//Start NotepadRun>notepad.exeWaitWindowOpen>Unti
52Scripting Windows For Beginners© 2015 MJT Net Ltd3.8Where To Go From HereIn this guide we have met the following common commands:Run ProgramWaitWind
Command ReferencePartIV
54Command Reference© 2015 MJT Net Ltd4 Command Reference4.1Complex ExpressionsSyntaxIn Macro Scheduler all complex functions should be contained withi
55 Macro Scheduler© 2015 MJT Net Ltd4.1.2 Logical OperatorsBitwise logical operatorsnot bitwise negationand bitwise andor bitwise orxor bitwise xorshl
56Command Reference© 2015 MJT Net Ltdfunction Cos(X: Float): FloatThe Cos function returns the cosine of the angle X, in radians.function Exp(X: Float
57 Macro Scheduler© 2015 MJT Net Ltdsearches for Substr within S and returns an integer value that is the index of the first character ofSubstr within
58Command Reference© 2015 MJT Net LtdOf course we could do:Let>[email protected]>at={Pos("@",%email%)}Let>IsItAnEmail={i
VIContents© 2015 MJT Net Ltd...
59 Macro Scheduler© 2015 MJT Net Ltd4.3Console App Funtions4.3.1 SOWriteSOWrite>textWrites text to STDOUT. For compiled console EXEs only. This f
60Command Reference© 2015 MJT Net Ltd4.4.2 DBConnectDBConnect>connection_string,database_referenceNot supported in Macro Scheduler Lite.Connects to
61 Macro Scheduler© 2015 MJT Net LtdFor more advanced database manipulation use VBScript. See:http://www.mjtnet.com/blog/2006/02/20/accessing-databas
62Command Reference© 2015 MJT Net LtdTo set a timeout for the command set the DB_COMMANDTIMEOUT variable to a number ofseconds.For more advanced datab
63 Macro Scheduler© 2015 MJT Net Ltdformat.See also: DateDiff , DateLocal , DatePartExamplesGetDate>todayDateAdd>today,D,-1,yesterdayDateAdd>
64Command Reference© 2015 MJT Net LtdD: Day of monthM: MonthY: YearThe date should be in a format recognised by the system. Use DateLocal to generat
65 Macro Scheduler© 2015 MJT Net Ltdday 7.Abbreviation : DOWSee also: Day , Month , Year , GetDate , GetTimeExampleThis example displays the current d
66Command Reference© 2015 MJT Net LtdConCat>msg,dateMessage>msg4.5.9 GetTimeGetTime>resultReturns the current time in the specified variable.
67 Macro Scheduler© 2015 MJT Net Ltd4.5.12 MonthMonth>resultReturns the current month number in the specified variable. Abbreviation : MonSee also
68Command Reference© 2015 MJT Net LtdTimeAdd>now,M,30,HalfHourLater4.5.15 TimeDiffTimeDiff>time1,time2,interval,resultReturns the difference bet
Macro SchedulerVII© 2015 MJT Net Ltd...
69 Macro Scheduler© 2015 MJT Net LtdSee also: TimeAdd , TimeDiff , TimePartExample:TimeLocal>13,15,00,localTime4.5.18 TimerTimer>resultReturns t
70Command Reference© 2015 MJT Net Ltd4.6DDE Commands4.6.1 DDEPokeDDEPoke>Server,Topic,Item,DataPokes data to the given DDE server. The server&apos
71 Macro Scheduler© 2015 MJT Net LtdExamples4.7.1 Dialog ObjectsThe following types of object are currently supported:Form (The Dialog Itself)LabelEdi
72Command Reference© 2015 MJT Net LtdAddDialogHandler>Dialog1,btnBrowse,OnClick,DoBrowse//Here we perform the file browse, then get the filename an
73 Macro Scheduler© 2015 MJT Net LtdLeft Specifies the horizontal coordinate of the left edge of acomponent relative to its parent. LoadBitmapSpecify
74Command Reference© 2015 MJT Net Ltdautomatically to accommodate its contents. BiDiMode Specifies the bi-directional mode for the control. BorderIcon
75 Macro Scheduler© 2015 MJT Net LtdLeft Specifies the horizontal coordinate of the left edge ofa component relative to its parent. Margins Specifies
76Command Reference© 2015 MJT Net LtdNote: it may not be possible to use all of these properties fully within Macro Scheduler.4.7.1.4 MainMenu - Menu
77 Macro Scheduler© 2015 MJT Net LtdConstraints Specifies the size constraints for the control. Cursor Specifies the image used to represent the mouse
78Command Reference© 2015 MJT Net LtdWidth Specifies the horizontal size of the control or form inpixels. WordWrap Specifies whether the label text wr
VIIIContents© 2015 MJT Net Ltd...
79 Macro Scheduler© 2015 MJT Net LtdImeName Specifies the input method editor (IME) to use for convertingkeyboard input to Asian language characters.
80Command Reference© 2015 MJT Net LtdBiDiMode Specifies the bi-directional mode for the control. BorderStyle Determines whether the edit control has a
81 Macro Scheduler© 2015 MJT Net LtdBiDiMode. ParentColor Determines where a control looks for its colorinformation. ParentCtl3D Determines where a co
82Command Reference© 2015 MJT Net LtdBiDiMode Specifies the bi-directional mode for the control. Caption Specifies a text string that identifies the c
83 Macro Scheduler© 2015 MJT Net LtdTabOrder Indicates the position of the control in its parent's taborder. TabStop Determines if the user can t
84Command Reference© 2015 MJT Net LtdFont Controls the attributes of text written on or in thecontrol. Height Specifies the vertical size of the contr
85 Macro Scheduler© 2015 MJT Net LtdTabStop Determines if the user can tab to a control. TabWidth Specifies the size of the tabs in the list box. Tag
86Command Reference© 2015 MJT Net Ltdthe drop-down list. Enabled Controls whether the control responds to mouse,keyboard, and timer events. Font Contr
87 Macro Scheduler© 2015 MJT Net LtdTabStop Determines if the user can tab to a control. Tag Stores an integer value as part of a component. Text Cont
88Command Reference© 2015 MJT Net Ltdstored in the dialog. To link dynamically assign afilename to LoadImage at runtime.Margins Specifies the margins
Komentáře k této Příručce