Hot Keys not working on Windows 10

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
asodhi
Newbie
Posts: 7
Joined: Sat Oct 17, 2020 1:39 pm

Hot Keys not working on Windows 10

Post by asodhi » Sat Oct 17, 2020 1:57 pm

Hello,

We have an application (exe file) that was built using macro scheduler a few years ago by someone who is no longer with company. Our company is now upgrading all workstations to Windows 10 and this application is failing during our testing. Basically, the exe file launches but the hot keys do not work at all and I have been tasked with resolving this issue.

I don't which version of Macro Scheduler was used to build this exe file, but the last time the production file was touched was in 2016 by the previous person who built this.

My questions are...

1. Has anyone else experienced similar issues?
2. What is the best course of action to resolve this?

Any assistance is greatly appreciated...

Thank you in advance,

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

Re: Hot Keys not working on Windows 10

Post by Marcus Tettmar » Sat Oct 17, 2020 11:21 pm

How are these 'hotkeys' implemented? Do you have the code for the .exe?
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

asodhi
Newbie
Posts: 7
Joined: Sat Oct 17, 2020 1:39 pm

Re: Hot Keys not working on Windows 10

Post by asodhi » Tue Oct 20, 2020 4:01 pm

Hello,

Thank you for the reply ... yes I have the EXE code ...and I think this is what you are asking ...

Code: Select all

Assigned>option_autorun,option_autorun_set
Assigned>option_hotkey,option_hotkey_set
If>{(%option_autorun_set%=TRUE) AND (%option_hotkey_set%=TRUE)},update_Dialog1_Option_tab
GoSub>DoGetUserOptionsFromENGWebServer
Label>update_Dialog1_Option_tab
If>option_autorun=True
SetDialogProperty>Dialog1,AutoRunLoginWithPCStartup,Checked,True
EndIf
If>option_autorun=False
SetDialogProperty>Dialog1,AutoRunLoginWithPCStartup,Checked,False
EndIf
If>option_hotkey=1
SetDialogProperty>Dialog1,MSRadioGroup3,ItemIndex,0
EndIf
If>option_hotkey=2
SetDialogProperty>Dialog1,MSRadioGroup3,ItemIndex,1
EndIf
Last edited by asodhi on Mon Oct 26, 2020 3:26 pm, edited 1 time in total.

User avatar
Dorian (MJT support)
Automation Wizard
Posts: 1348
Joined: Sun Nov 03, 2002 3:19 am
Contact:

Re: Hot Keys not working on Windows 10

Post by Dorian (MJT support) » Wed Oct 21, 2020 9:50 am

Is this everything you have? It seems this is only a portion of the script.
Yes, we have a Custom Scripting Service. Message me or go here

asodhi
Newbie
Posts: 7
Joined: Sat Oct 17, 2020 1:39 pm

Re: Hot Keys not working on Windows 10

Post by asodhi » Wed Oct 21, 2020 3:00 pm

Hello,

I have attached the full production file ...

Thank you in advance

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

Re: Hot Keys not working on Windows 10

Post by Marcus Tettmar » Fri Oct 23, 2020 1:36 pm

I don't see anything that looks like a 'hotkey' in this script. For a script to create 'hotkeys' I would expect to see either OnEvent>KEY_DOWN handlers or WaitKeyDown. There's nothing like that in this script.

For non-compiled scripts the hotkeys are usually set up in and handled by Macro Scheduler itself. Obviously for a compiled .exe that runs standalone without Macro Scheduler this wouldn't be the case.

Another way to create 'hotkeys' is to create a shortcut to the .exe and then in the short-cut properties set a short cut key combination.

Perhaps something like this was set up and has now been removed?
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

asodhi
Newbie
Posts: 7
Joined: Sat Oct 17, 2020 1:39 pm

Re: Hot Keys not working on Windows 10

Post by asodhi » Fri Oct 23, 2020 2:29 pm

Thank you for the reply !

Just wondering if this could be the root cause of the problem ....

Code: Select all

END>DoGetUserOptionsFromENGWebServer
SRT>DoCheckIfUserChangedOptions
GetDialogProperty>Dialog1,AutoRunLoginWithPCStartup,Checked,option_tab_autorun
GetDialogProperty>Dialog1,MSRadioGroup3,ItemIndex,option_tab_hotkey
Let>option_tab_hotkey=option_tab_hotkey+1
If>{(%option_tab_autorun%=%option_autorun%) AND (%option_tab_hotkey%=%option_hotkey%)}
SetDialogProperty>Dialog1,MSButton3,Visible,False
SetDialogObjectFocus>Dialog1,MSButton2
Else
SetDialogProperty>Dialog1,MSButton3,Visible,True
SetDialogObjectFocus>Dialog1,MSButton3
EndIf
END>DoCheckIfUserChangedOptions
SRT>DoWriteNewOptionsToENGWebServer
LibFunc>user32,GetCursor,curCurs
LibFunc>user32,CopyIcon,savCurs,curCurs
LibFunc>user32,LoadCursorFromFileA,newCurs,%WIN_DIR%\cursors\appstart.ani
LibFunc>user32,SetSystemCursor,sscr,newCurs,32512
LibFunc>user32,SetCursor,scr,newCurs
GetDialogProperty>Dialog1,AutoRunLoginWithPCStartup,Checked,option
Last edited by asodhi on Mon Oct 26, 2020 3:25 pm, edited 1 time in total.

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

Re: Hot Keys not working on Windows 10

Post by Marcus Tettmar » Fri Oct 23, 2020 2:38 pm

That just seems to be showing/hiding dialog objects based on the selection of some radio buttons.

I thought by hot keys you mean a system wide sequence of keystrokes which you want to use to invoke the macro in the first place. Or some keystrokes to wait for/detect within the macro.

What you’ve sent appears to be how a dialog is updated in response to the user selecting a radio button.

I’m confused as how this relates to your original post about windows 10 and hot keys.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

asodhi
Newbie
Posts: 7
Joined: Sat Oct 17, 2020 1:39 pm

Re: Hot Keys not working on Windows 10

Post by asodhi » Sun Oct 25, 2020 2:44 pm

Good morning,

I will try to explain the situation the best I can based on the little information I have ...
  • We have app that was built with using Macro Scheduler.
    Currently, the app (exe file) resides on a users workstation (Windows 7)
    The app runs in the background and there is an icon in the systray
The app production code resides a Windows 2012 server (VM)

The function of the app is to allow users to highlight alpha/numeric values and hit "ALT + *" or "ALT + ~" which then triggers the app to make a call/query to the source system and display information.

Now, our company has decided to upgrade all of the workstations to Windows 10 and during the testing of this app the options/"hot keys" ... "ALT + *" or "ALT + ~" do not work on a Windows 10 machine ...

The app also uses php to pass these options ("ALT + *" or "ALT + ~") and log user information to log files on the VM.

I hope I explained this ... sorry if this adds more confusion

asodhi
Newbie
Posts: 7
Joined: Sat Oct 17, 2020 1:39 pm

Re: Hot Keys not working on Windows 10

Post by asodhi » Mon Oct 26, 2020 3:25 pm

Good morning ...

So I broke down and purchased the Pro version of the software this morning and ran the debug tool against the existing code and noticed the following error ...

0: LAST_ERROR=Missing parameters in function call (minimum of 5 expected)

Below is the code it is refering to ....

Code: Select all

Items.Strings = (
'ALT key plus the star key * (asterisk) on the keyboard Num Pad -' +
' Desktop users only'
'ALT key plus the grave accent key ` (located below the Esc key) ' +
'- Desktop and Laptop users')

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

Re: Hot Keys not working on Windows 10

Post by Marcus Tettmar » Mon Oct 26, 2020 3:56 pm

Hi,

Firstly, I'm quite confused. I don't know what is creating the 'hot keys' you are referring to. I didn't see anything in the code you sent that suggested there were any hot keys set up at all. It is uncommon for the macro itself to extablish hotkeys. Most people use Macro Scheduler to set up hot keys. As in the interface of Macro Scheduler, not within a script itself. But if creating a .exe which is to be run without Macro Scheduler being installed, then sure, you'd need some other way to create hot keys. The most common approach is to set them up with shortcut keys in Windows shortcuts. That said it IS possible to make macros themselves listen for hot keys.

Usually by hit keys we are referring to system wide hot keys. I'd usually use an OnEvent to do that. But I didn't see any OnEvents set up in your code.

You do have a dialog and it is possible to create 'accelerator keys' so that buttons can be triggered by keyboard shortcuts but these are never system wide and would only work when the object has the focus. Is it possible you are referring to those?

Finally the code you just posted is not a function call. It looks like it could be part of a dialog or something else but would not cause a missing parameters error message because it's not a command.

I feel like we need to go right back to basics here as I'm not convinced we're both talking about the same things. It would help if you could email support your FULL script and explain what issue you are seeing and what you expect to be happening.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

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

Re: Hot Keys not working on Windows 10

Post by Marcus Tettmar » Mon Oct 26, 2020 3:57 pm

I don't see anything in the code you have posted that would make the macro respond to ALT + * or ALT + - or any other keys. Perhaps you have not posted the whole code?
asodhi wrote:
Sun Oct 25, 2020 2:44 pm
Good morning,

I will try to explain the situation the best I can based on the little information I have ...
  • We have app that was built with using Macro Scheduler.
    Currently, the app (exe file) resides on a users workstation (Windows 7)
    The app runs in the background and there is an icon in the systray
The app production code resides a Windows 2012 server (VM)

The function of the app is to allow users to highlight alpha/numeric values and hit "ALT + *" or "ALT + ~" which then triggers the app to make a call/query to the source system and display information.

Now, our company has decided to upgrade all of the workstations to Windows 10 and during the testing of this app the options/"hot keys" ... "ALT + *" or "ALT + ~" do not work on a Windows 10 machine ...

The app also uses php to pass these options ("ALT + *" or "ALT + ~") and log user information to log files on the VM.

I hope I explained this ... sorry if this adds more confusion
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

asodhi
Newbie
Posts: 7
Joined: Sat Oct 17, 2020 1:39 pm

Re: Hot Keys not working on Windows 10

Post by asodhi » Mon Oct 26, 2020 4:27 pm

Hi Marcus,

I agree ... we need to go back to basics ....

As requested, I have emailed Support and attached the full production file.

thank you and take care

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