Help is needed with Set Widget Value action

Be sure to get AHK from here:

http://ahkscript.org

The other site (http://www.autohotkey.com) contains an outdated version that is no longer maintained.

I know I’m close, because I can get the Widget Handle. But I can’t control it. I’m missing something simple

As soon as I can get control of it, we got this thing licked.

2 Likes

Okay, what does that mean?

It just means the Response did not contain <title>Login.
My test showed that as well, though we both know that the supplied username/password were invalid.

You need to make your Success check look for something else.

1 Like

@emre, Is it possible to implement it?

Here it is. It will need some tweaking for different pages, but this lets you alter values on a page…

I moved this post to another Topic (Tutorial) for a fresh start…

@QMcKay Where from am I supposed to download the file

Acc Library:

Here: http://www.autohotkey.com/board/topic/77303-acc-library-ahk-l-updated-09272012/

More directly, here: https://copy.com/oiLspOmEi0xVCg1F/Acc.ahk?download=1

What am I doing wrong?

@QMcKay,
Update: I managed to run the script and the site opens in HTML Viewer Widget
But where do I set the user name and Password to auto fill?

Just finished working that out too…

page.Document.getElementById("username").Value := "yourusername"
page.Document.getElementById("password").Value := "yourpassword"
page.Document.getElementById("loginForm").Submit()

You can take out the Navigate function in the script if the Widget already has that set - in fact, I recommend it, since it will take time for the page to load. Also, you may want to preceed the above with a sleep function like:

Sleep 10000

Also, if the Submit() doesn’t work (it may not, I can’t find the FORM name in the page), instead try:

page.Document.getElementById("login-button").Click()

or

page.Document.getElementById("form").Submit()
1 Like

Okay thank you I’ll wait you finish
And tell me where to place it
I would love if you could check my site if it fills the fields user name and Password when it will be finished
Thanks again.

WoW I love you @QMcKay I have been working on that very thing for TimeTrex. YOu saved me a major headache… I almost had mine working… you made me realize my mistake haha. I was using .Submit() this entire time it was .Click() I did not look that it was a button…

I had given up on using AHK because of it… so I was interested and watching this thread. The method of getting the widget you used was different than what i was using but yours is a lot easier… So I am switching over to it.

@pizzaeilat4

Just replace

page.Navigate(“http://www.google.com”)

With

page.Document.getElementById(“username”).Value := “yourusername”
page.Document.getElementById(“password”).Value := “yourpassword”
page.Document.getElementById(“loginForm”).Submit()

Make sure your widget is set to load the Webpage already. This will not only auto populate but it will even auto log in just like roboform.

@QMcKay now that you helped me get this working… this will open up an entire new level of interaction with TimeTrex…

@QMcKay,
Yes yes yes yes it works
Wow thank you thank you thank you thank you :smiley:
Now there is the possibility of adding enter?

LOL, I can’t even get your page to load in the Widget whether I set it in the Widget or Navigate with the code… it just freezes with that progress bar…

The script he posted does the log in as well. You just need to find the ID of it… and if its a button or not.

Example for mine (TimeTrex) I had to change the script

page.Document.getElementById(“loginForm”).Submit()

to

page.Document.getElementById(“login_btn”).Click()

Notice both Submit and LoginForm I had to change

1 Like

@QMcKay It happens to me on the computer at home
I think it was caused by all the attempts we made (I’d be happy if you find why this is happening :wink: )
But on the other computer it works great

Thanks @kendash , I’ll try it

I use firefox so to find the ID i simply right clicked button and chose inspect element. Or you can do it old school and just view the source but i like the easy way myself.

It’s not letting me like your post anymore I am disappointed. I was going to throw out 3 more likes.