Category: Scripting

Associating a File Extension with a Compiled Macro

June 23, 2010 by Marcus Tettmar in General, Scripting

I have a few scripts which perform actions on files. Rather than have the script ask me what file to use, it is easier to associate the file type with the script so that I can just double click on the file (or right click and choose “Open with”) in Windows Explorer. For this to […]

Read more »

Tweeting from Macro Scheduler Without the API

May 24, 2010 by Marcus Tettmar in Automation, Scripting, Web/Tech

A while back I posted an article showing how to Tweet via Twitter‘s API. It uses basic authentication which Twitter plan to turn off in the near future. The alternative, oAuth is awkward for desktop based apps, but xAuth is now available and should be doable in Macro Scheduler. I have requested xAuth access from […]

Read more »

Weekly Forum Round-up

May 21, 2010 by Marcus Tettmar in Automation, General, Scripting, Testing

I thought I might start a weekly round up of some of the Macro Scheduler forum posts that caught my eye during the week. Not everyone gets a chance to browse the forums all the time, so it might help to link to some here. Then those that subscribe to the blog via RSS/Email will […]

Read more »

Run All Macros in a Folder/Group

May 7, 2010 by Marcus Tettmar in Automation, Scripting

Someone asked me today how to run all macros found in a folder. This simple script will run all macros it finds in its own folder in turn: GetFileList>%SCRIPT_DIR%\*.scp,MacroFiles Separate>MacroFiles,;,Macros If>Macros_count>0 Let>k=0 Repeat>k Let>k=k+1 Let>this_macro=Macros_%k% If>this_macroSCRIPT_FILE Macro>this_macro Endif Until>k=Macros_count Endif Note the check to make sure it doesn’t run itself! This could be useful where […]

Read more »

Screen Magnifier In Only 34 Lines of Code

March 8, 2010 by Marcus Tettmar in General, Scripting

Check out this screen magnifier, written by Dick Lockey in only 34 lines of Macro Scheduler code.   Paste it into a macro, hit run and then as you move the mouse around your screen you’ll see a 5x magnification of the cursor area. Dialog>Dialog1 Caption=5X Magnify Width=800 Height=500 Top=500 Left=48 EndDialog>Dialog1 Show>Dialog1 LibFunc>user32,GetDC,HDC1,Dialog1.handle LibFunc>user32,GetDC,HDC3,0 […]

Read more »

Convert raw VBScript .vbs files to Macro Scheduler Scripts

March 1, 2010 by Marcus Tettmar in Scripting

As you probably know Macro Scheduler scripts can include Microsoft VBScript. Not only can you CALL VBScript code you can also pass values into it and retrieve values out of it (I’ve seen many competitors claim you can use VBScript in their macros when what they really mean is you can only call external VBScripts […]

Read more »

Force DBQuery to Read CSV Columns as Text

January 28, 2010 by Marcus Tettmar in Scripting

In More on Reading and Writing CSV Files and various other posts I have demonstrated how CSV data can be read via a SQL SELECT statement using DBQuery. In order to do this we used an ADO connection string in the DBConnect line: Let>ConStr=Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\My Documents;Extended Properties=’text;HDR=NO;FMT=Delimited’ DBConnect>ConStr,dbH “Proper” CSV files use the double quote […]

Read more »

Get Auto-Generated ID Created By INSERT SQL

January 26, 2010 by Marcus Tettmar in Scripting

If you have a database table with an auto-generated numerical index field, you may need to retrieve the value of this field after an INSERT statement. In Microsoft Access such a field uses an “AutoNumber” data type. In MySQL it’s known as an “auto_increment” field. We often see these types of fields where a relationship […]

Read more »