filecreateshortcut - hotkey not remember on reboot

12 posts in this topic

sulfurious 0

First and foremost, AutoIT rules. Especially when it comes to string manip. Sooooo many times I have started in vbs, only to dump it and use AutoIT. Usually because of the strenght of the string manips.

Anyway, here is something that is stumping me.

Using filecreateshortcut, with all proper paths and whatnot, also setting hotkey of "^{NumPad3}". This shortcut (.lnk) is on the desktop, and calls a compiled .au3 script in another directory. Pretty simple. It works fine when I run it. And then it does exactly what it is supposed to, doing the action on the hotkey.

But on a reboot, the hotkey is gone. The shortcut is still there and it works when ran, but no hotkey. If I make the shortcut with no hotkey, then assign if via standard right click/properties, it resumes on a reboot. I can't seem to find and answer for this one. I have yet to find a registry entry for such things.

Anyone see this before?

Thnx,

Sul

Share this post

Link to post

Share on other sites

SmOke_N 178

First and foremost, AutoIT rules. Especially when it comes to string manip. Sooooo many times I have started in vbs, only to dump it and use AutoIT. Usually because of the strenght of the string manips.

Anyway, here is something that is stumping me.

Using filecreateshortcut, with all proper paths and whatnot, also setting hotkey of "^{NumPad3}". This shortcut (.lnk) is on the desktop, and calls a compiled .au3 script in another directory. Pretty simple. It works fine when I run it. And then it does exactly what it is supposed to, doing the action on the hotkey.

But on a reboot, the hotkey is gone. The shortcut is still there and it works when ran, but no hotkey. If I make the shortcut with no hotkey, then assign if via standard right click/properties, it resumes on a reboot. I can't seem to find and answer for this one. I have yet to find a registry entry for such things.

Anyone see this before?

Thnx,

Sul

Wouldn't a script have to be running in order for a HotKey to work?

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Time you enjoyed wasting is not wasted time ......T.S. ElliotSuspense is worse than disappointment................Robert BurnsGod help the man who won't help himself, because no-one else will...........My Grandmother

Time you enjoyed wasting is not wasted time ......T.S. ElliotSuspense is worse than disappointment................Robert BurnsGod help the man who won't help himself, because no-one else will...........My Grandmother

What operating system and AutoIt version are you using? Does the example in the help file exhibit the same problem? After you reboot, does the shortcut key in the file's properties actually say "None" or does it say "Ctrl + Num 3" and fail to work.

* In my experience, Windows hotkey shortcuts are buggy. For example, create a shortcut on your desktop to calc. Assign a hotkey to it, and make sure it works. Then, rename your shortcut (i.e., rename calc.exe to calc.foo). The hotkey doesn't work even though it's still listed in the shortcut properties! Rename the shortcut back to its original name and the hotkey works again.

Even more fun happens if you delete that shortcut: You are unable to assign that hotkey to any new shortcut until you reboot (restart explorer.exe)..... Or if you recreate the shortcut before rebooting and try to assign the hotkey to it, Calculator windows appear....

Share this post

Link to post

Share on other sites

sulfurious 0

Running Xp pro SP2, AutoIt beta 311. The hotkey is for the link, meaning it is the same as link properties/shortcut. It works perfectly when I make the link. Can ctl + numpad3 all day. Reboot, it does not, and the properties of the link still says Ctrl+Numpad3. If I make the hotkey manually, it stays after reboot.

Share this post

Link to post

Share on other sites

SmOke_N 178

Running Xp pro SP2, AutoIt beta 311. The hotkey is for the link, meaning it is the same as link properties/shortcut. It works perfectly when I make the link. Can ctl + numpad3 all day. Reboot, it does not, and the properties of the link still says Ctrl+Numpad3. If I make the hotkey manually, it stays after reboot.

Share this post

Link to post

Share on other sites

sulfurious 0

lol, I did the same thing the first time around. Have to use the ^ and {} to do it. I would have done this in vbs, except there is no numpad ablility for hotkeys on creating shortcuts. Actually these kind of hotkeys only work from the desktop anyway. But if you set the .lnk attribs to Hidden, you don't even see them and the hotkey works from pretty much everywhere, thus the need to use a hotkey combo that will not be invoked in a program, say maybe like office or firefox.

I am using them to set the policy on my firewall. The OP_SA.exe is an autoIT script (exe) that activates a hidden window, Alts throught the menus and sets the policy. Very quick way to do something that before took multiple mouse clicks to do.

Share this post

Link to post

Share on other sites

sulfurious 0

Had to confirm it one more time. Compiled the script with the Au2.exe from the beta folder. I assume there is no other way to compile it. Maybe that is my problem.

Regardless, recompiled OP_SA.exe. Recompiled the createshortcut script, this time including a message box as the first thing. Run the script and make the link. Hotkey works. Reboot. Hotkey does not work. Not even the msgbox, so the hotkey is not firing. Delete the shortcut. Make it the old fashioned way - send to. Manually set the shortcut to Ctrl+NumPad3. It works. Reboot, it still works.

Curiously, I have to delete all of the links created by AutoIT from the desktop and make them the old fashioned way before they can be assigned ANY hotkey. No matter what I put in it (it lets me), they will not function if AutoIT created them.

Hmmm.

Sul

Share this post

Link to post

Share on other sites

sulfurious 0

Also to note. The firewall is normally a hidden window that is only visible if the tray icon shows it. The OP_SA exe is activating it, using it, then hiding it. Normally on bootup, you only see the firewall icon and the window is hidden. However, I have noted that after creating the shortcut on the desktop to the OP_SA exe, using Ctrl+NumPad3 as the hotkey, that the window is now visible. This is not typical.