SRL Archive - OSR Help

Shift+Control+Click


OZ!TO

2010-02-21 05:21:33

Hi,

I have been working a web-browser script that requirest to click on links.

The script cliks on a link and then calls a procedure with waits and keypresses to eventually return to the start page and refresh. And go back to the main script.

So for every click it takes ~10 seconds to go back to the main page hunting for links. I realise a more efficient way to do this would be to open the new links in new browser tabs Which using FF is Control+Click or Opera is Shift+Control+Click. Once the links are open they can just stay open or for a more advanced idea, make a function to go around clicking on the "X" to close them.

I have searched around for the byte which is Shift or Control, thinking of having a procedure that would hold the key, use the SRLs mouse click function then release the key. Problem is that I can't find how to press these keys from the script. I did find isfunctionkeydown() but what I want is not the test but to do it "functionkeydown"? Anyone can point me to the right source?

Cheers

Naum

2010-02-21 05:29:52

I think if you click the mouse wheel then it also opens up a new tab, so
ClickMouseMid(X, Y)

Could work, I'll edit my post in a sec with the actual answer ;).

Here:

Begin
KeyDown(VK_Shift); //holds down shift
KeyDown(VK_Control); //holds down control
ClickMouse(X, Y, True); //clicks at 'x', 'y'.
Wait(80); //waits for 80 msec
KeyUp(VK_Shift); //puts the key up
KeyUp(VK_Control); //puts the key up
End.

Baked0420

2010-02-21 07:41:48

Naum, can you tell us where you found that in case anyone else wants to know how to press other keys? Like is there a list somewhere that we can find that?

Naum

2010-02-21 08:17:00

Scar: Ctrl+Space and type in VK_, standard lol.

Baked0420

2010-02-21 08:30:00

oh I didn't know all those VK_ keys would show up in ctrl+space, and I use ctrl+space from time to time also. Thanks, I'm sure that'll come in handy for some people and probably even me one day.

Gu3st...

2010-02-21 08:49:59

Or do F1 and find the ASCII table

OZ!TO

2010-02-23 14:27:50

Perfect, thanks!