Rank: Advanced Member
Groups: Approved
Joined: 3/30/2019(UTC) Posts: 74 Thanks: 8 times Was thanked: 1 time(s) in 1 post(s)
|
Hi, I meet you again. Now, I have a problem and need your help. The code I use in Google Browser is as follows. It executed the Close Label when I did not press Ctr, but when I used it the second time, it executed the Close Browser without pressing Ctrl. Please help me to find out why. if (sp.GetKeyState(vk.CONTROL)){ sp.SendKeys("%{F4}") }else{sp.SendKeys("^w")}
|
|
|
|
Rank: Administration
Groups: Translators, Members, Administrators Joined: 1/11/2018(UTC) Posts: 1,359 Location: Tampa, FL Thanks: 28 times Was thanked: 419 time(s) in 356 post(s)
|
What is the action bound to? Is this an action where Control is a modifier? You should be using this, though, either way: Code:if(sp.GetKeyState(vk.LCONTROL) & 0x8000) {
//Control down
}
There might be a timing issue if control is also being used in the action.
|
|
|
|
Rank: Administration
Groups: Translators, Members, Administrators Joined: 1/11/2018(UTC) Posts: 1,359 Location: Tampa, FL Thanks: 28 times Was thanked: 419 time(s) in 356 post(s)
|
That would be for the left control button, you might use CONTROL or RCONTROL, depending on your keyboard layout and usage.
|
|
|
|
Rank: Advanced Member
Groups: Approved
Joined: 3/30/2019(UTC) Posts: 74 Thanks: 8 times Was thanked: 1 time(s) in 1 post(s)
|
Yeah. When I press Ctrl on the keyboard, the above problem is not there, but no function has been implemented. I think it is not just a matter of time. It does not achieve the same effect as executing Ctrl modifier keys. Or is it that this script can't achieve that effect at all? Edited by user Saturday, June 8, 2019 12:40:22 AM(UTC)
| Reason: Not specified
|
|
|
|
Rank: Administration
Groups: Translators, Members, Administrators Joined: 1/11/2018(UTC) Posts: 1,359 Location: Tampa, FL Thanks: 28 times Was thanked: 419 time(s) in 356 post(s)
|
I think we are having a bit of a language/translation barrier. Can you describe is very fine detail how the action is configured, the exact steps and sequences, and the results in the different scenarios?
|
|
|
|
Rank: Advanced Member
Groups: Approved
Joined: 3/30/2019(UTC) Posts: 74 Thanks: 8 times Was thanked: 1 time(s) in 1 post(s)
|
I'm sorry for my poor English. I want to complete the gesture of closing the browser when I press the Ctrl key, and closing Tab without pressing the Ctrl key.
|
|
|
|
Rank: Administration
Groups: Translators, Members, Administrators Joined: 1/11/2018(UTC) Posts: 1,359 Location: Tampa, FL Thanks: 28 times Was thanked: 419 time(s) in 356 post(s)
|
Honestly, you should just make another action with Control and Left as modifiers, so each action does the intended script. Not to say you have to do this, but I think it would be much simpler
|
|
|
|
Rank: Advanced Member
Groups: Approved
Joined: 3/30/2019(UTC) Posts: 74 Thanks: 8 times Was thanked: 1 time(s) in 1 post(s)
|
Maybe you are right. Thank you, Rob
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.
Important Information:
The StrokesPlus.net Forum uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close