AutoHotkey Community

It is currently May 26th, 2012, 8:15 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: June 19th, 2008, 4:20 am 
Offline

Joined: December 29th, 2006, 6:57 am
Posts: 123
Location: Australia
I have an application on a USB memory drive and it works by calling the location by Using

Code:
 %A_WorkingDir%


Now when I create a key in the registry the hot key detection program loads but it looks in another directory other that the USB one. In Basic I can use the command "Application.Path" which tells the application where it is. As it is on a USB memory device the drive letter may change.

I have not found an equivenent command as
Code:
Run, %A_WorkingDir%\Application.exe
even when the hotkey detection script is in the same folder will not find Application.exe.

It works if I create a shortcut or even a Autorun script

Any ideas welcomed.

Also I am still looking for a autorun method that will autostart a application on USB insertion the best so far is

Code:
[Autorun]
Open=Program.exe
icon=Program.exe
label=Program Drive
action=Program


That gets it to the option window. It seems to work in all instances Sometimes the Autoplay needs setting.

For a CD its different it runs merrily away. I cannot quite get the same effect with a usb memory device.

Terry

_________________
(The guy from Oz)


Report this post
Top
 Profile  
Reply with quote  
PostPosted: June 19th, 2008, 6:21 am 
Offline

Joined: June 18th, 2008, 8:33 pm
Posts: 20
TeeTwo wrote:
Also I am still looking for a autorun method that will autostart a application on USB insertion the best so far is...

For a CD its different it runs merrily away. I cannot quite get the same effect with a usb memory device.

Autorun for CD drives works differently than autorun for removable devices. http://en.wikipedia.org/wiki/Autorun#How_Explorer_recognizes_AutoRun_capability gives all of the different classes of autorun. Notice how DRIVE_REMOVABLE (what your flash drive falls under) is disabled by default. This is why U3 installs a virtual CD drive, in order to autorun an application in Windows.


For the rest of your problem...
Code:
%A_ScriptDir%
?
--tested in .ahk and .exe to work correctly

_________________
ttrickyy


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 19th, 2008, 2:52 pm 
Offline

Joined: December 29th, 2006, 6:57 am
Posts: 123
Location: Australia
I appreciate the heads up and links. Really a U3 should only be a standard USB device with a program on it. I have heard of people reformating one to see what happens and lose the Autostart feature. In Australia I have not come across one yet

Terry

_________________
(The guy from Oz)


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: BrandonHotkey, poserpro, sjc1000, Tilter_of_Windmills, Yahoo [Bot] and 57 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group