Command to display a WORD file ?

General Macro Scheduler discussion

Moderators: Dorian (MJT support), JRL

Post Reply
wdc
Junior Coder
Posts: 33
Joined: Mon Jun 09, 2003 1:37 am
Location: Chevy Chase Maryland

Command to display a WORD file ?

Post by wdc » Thu Mar 06, 2008 4:35 am

What is the MacroScheduler 6.2 command to display a WORD file, apple.doc, located in C:\my documents?

User avatar
JRL
Automation Wizard
Posts: 3518
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Thu Mar 06, 2008 4:42 am

From help for ExecuteFile>

ExecuteFile>file_to_execute[,parameters]


Executes a file using the application associated with the given file's filetype.
file_to_execute can include a full path.

Abbreviation : Exe

Therefore:
ExecuteFile>C:\my documents\apple.doc





.

User avatar
jpuziano
Automation Wizard
Posts: 1085
Joined: Sat Oct 30, 2004 12:00 am

Post by jpuziano » Thu Mar 06, 2008 8:22 am

Hi JRL and Everyone,

Seeing the parameters in the ExecuteFile> command... I have a question... This does not seem to work:

Code: Select all

ExecuteFile>C:\WINDOWS\system32\calc.exe,12.34
Sure the Windows Calculator program launches (calc.exe) but I would like to pass a value into it on launch so that when it fires up, the value is already entered. I've tried passing ,12.34 ,"12.34" ,'12.34' but no luck.

Perhaps calc.exe does not accept parameters? Can anyone verify that? Google isn't telling me much on this one.

Calc does accept values by just "pasting" them in though... I have a working script where I highlight a number in any screen, hit a Hot Key and the script...

- sends CTRL-C to copy the number into the clipboard
- fires up calc.exe
- pastes the number into calc.exe

Code: Select all

Press CTRL
Send>c
Release CTRL
Run Program>calc.exe
WaitWindowOpen>Calculator
Wait>0.2
Press CTRL
Send>v
Release CTRL
I notice calc.exe can also be fired up from a DOS prompt (using XP SP2 here). All the following typed at a DOS prompt started calc.exe but none provided any extra info about parameters...

calc.exe /?
calc.exe /h
calc.exe h

Does anyone know a way of passing in a number as a parameter when calc.exe is fired up?
jpuziano

Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post - :-)

User avatar
Marcus Tettmar
Site Admin
Posts: 7391
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Thu Mar 06, 2008 8:26 am

As far as I know calc.exe does not accept command line parameters.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Me_again
Automation Wizard
Posts: 1101
Joined: Fri Jan 07, 2005 5:55 pm
Location: Somewhere else on the planet

Post by Me_again » Thu Mar 06, 2008 2:34 pm

You can make the MacroScheduler Calculator example script start with a pre-entered number. Change

Let>expr=

to

Let>expr=InitValue

Then pass that parameter when you start it by adding

/InitValue=12.34

to the command.

User avatar
JRL
Automation Wizard
Posts: 3518
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Thu Mar 06, 2008 4:16 pm

me_again:
Thanks for the idea.

jpuziano:
Whats wrong with your paste solution? It seems to work flawlessly... (I took out the Wait>0.2 line. It didn't seem necessary.)

wdc:
Is apple.doc opening for you?

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts