I have a custom toolbar button with the following code assigned to it:
::open "C:\Documents and Settings\Alex\My Documents\My Dropbox\Scripts\XYplorer\shutdown.lnk"; #192
The .lnk is a Windows shutdown script which shuts the system down after 5 seconds. The #192 is supposed to close XYplorer, according to the command ID under Keyboard Shortcuts. If I run a button that has '#192# without the link beforehand, it works just fine, but as it is above, I get the following error (may not be exactly right - the system shut down before I could copy it down!):
Runtime Error 91:
Object variable or With block variable not set
Obviously the script is still working and the system still shuts down, but ideally I want it to close XYplorer down first (and ideally any other running programs).
What am I doing wrong here, and is it possible to close other running programs too?
Runtime Error 91
-
admin
- Site Admin
- Posts: 66258
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
XYplorer Beta Club