bug or secret?

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
katalonija2
Junior Coder
Posts: 21
Joined: Thu Mar 10, 2011 6:49 pm

bug or secret?

Post by katalonija2 » Tue Mar 22, 2011 2:04 pm

i copied PlayWav>c:\windows\media\chimes.wav in speed to solve problem with WaitKeyDown>q (or TAB) ...sometimes dont pick keypress
and sound is there?????

Problem is that i do not have c:\windows\ directory, as i always change default win dir...

How is it possible?

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

Post by Marcus Tettmar » Tue Mar 22, 2011 2:36 pm

PlayWav>%WIN_DIR%\media\chimes.wav
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

katalonija2
Junior Coder
Posts: 21
Joined: Thu Mar 10, 2011 6:49 pm

Post by katalonija2 » Thu Mar 24, 2011 12:42 am

yes, but i didnot copy %windir% in my command line in macro...only text, ordinary path that do not exist....

Are you saying that i can use path like c:\windows\system32 instead %windir%\system32 and it will work in macro every time, becouse macro interpreter replace c:\windows with %windir% ?

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

Post by Marcus Tettmar » Thu Mar 24, 2011 9:15 am

WIN_DIR is a Macro Scheduler system variable that holds the path to Windows. So, yes, it will resolve to the correct windows folder on any PC.

For the System folder you can use SYS_DIR which always resolves to the system32 folder wherever that may be.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

katalonija2
Junior Coder
Posts: 21
Joined: Thu Mar 10, 2011 6:49 pm

Post by katalonija2 » Sat Mar 26, 2011 5:09 am

Lets try on this way...

%windir%=C:\workload
(C:\workload\system32...C:\workload\system......)
C:\windows...does not exist....


What will do PlayWav>c:\windows\media\chimes.wav

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

Post by Marcus Tettmar » Sat Mar 26, 2011 3:51 pm

katalonija2 wrote:Lets try on this way...

%windir%=C:\workload
(C:\workload\system32...C:\workload\system......)
C:\windows...does not exist....


What will do PlayWav>c:\windows\media\chimes.wav
Like I said:

PlayWav>%WIN_DIR%\media\chimes.wav

WIN_DIR is automatically set to whatever the windows directory happens to be. It is set by the system.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

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