Sign in to follow this  
Followers 0
Aassdd

Wait for key press

11 posts in this topic

I'm making an auto login script for websites and since I'm using firefox which is not supported like ie...

Case $msg = $tray_logins_***
            ShellExecute("http://***/ucp.php?mode=login")
            WinWaitActive("***")
            Sleep(3000)
            Send("Username:{Tab}")
            Sleep(100)
            Send("username{Tab}password{Enter}")

I want to replace sleep(3000) with wait-for-key-press. How can I do this?

Share this post


Link to post
Share on other sites



So you are going to have your password in the script? Not wise. You are better off letting Firefox save your form history and passwords, at least then they will be encrypted. This way you can just navigate to the website and it will auto-login.

Share this post


Link to post
Share on other sites

I don't care if the passwords are encrypted or not, neither want to save form history.

Share this post


Link to post
Share on other sites

Case $msg = $tray_logins_***
            ShellExecute("http://***/ucp.php?mode=login")
            WinWaitActive("***")
            while 1
                        if _ispressed("7B") then exitloop
                        sleep(200)      
            wend
            Send("Username:{Tab}")
            Sleep(100)
            Send("username{Tab}password{Enter}")


---"Educate the Mind, Make Savage the Body" -Mao Tse Tung

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Sorry but where can I find the hex keys?

If i'm right, and 97 = a then it doesn't work because nothing happens when I press a.

EDIT: I want space.

Edited by Aassdd

Share this post


Link to post
Share on other sites

Sorry but where can I find the hex keys?

If i'm right, and 97 = a then it doesn't work because nothing happens when I press a.

EDIT: I want space.

0x7B is F12

You might find this useful for key codes


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

So you are going to have your password in the script? Not wise. You are better off letting Firefox save your form history and passwords, at least then they will be encrypted. This way you can just navigate to the website and it will auto-login.

Off topic but, I like the picture on your 'empty' website. Are the snowflakes made using the snowflake udf posted at the end of last year? And just out of interest, is the picture one you took?


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

Off topic but, I like the picture on your 'empty' website. Are the snowflakes made using the snowflake udf posted at the end of last year? And just out of interest, is the picture one you took?

I sent you a PM

Share this post


Link to post
Share on other sites

Can someone please help me?!

@martin

You got 1.5K+ posts and you don't know how to use the msgs system lol :P:D

Share this post


Link to post
Share on other sites

haven't we done that? If not, please state the exact problem/issue you're having in DETAIL.

"can someone please help me?" does not constitute a detailed question.


---"Educate the Mind, Make Savage the Body" -Mao Tse Tung

Share this post


Link to post
Share on other sites

Oops, I'm sorry.

When I opened the page I scrolled down (with the end key) to see the latest post. I read weaponx's post and then the previous post but didn't see the "0x7B is F12. You might find this useful for key codes" post.

PS: Thanks :D

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0