script to login into perforce and enter Username and Password

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
ejji09
Posts: 16
Joined: 17 Nov 2015, 08:54

script to login into perforce and enter Username and Password

22 Feb 2018, 07:37

Hi All,
I am trying to execute a simple script which will open the perforce application and enters username and password.
This is my script

Code: Select all

Run, "C:\Program Files\Perforce\p4v.exe"
sleep, 4000
send, username
send {tab}
send, password
send {enter}
but it dosent work for me, my scipt is able to open the application but it was not able to enter the username and password.
I tried with notepad.exe instead of p4v.exe. For notepad.exe it works like charm.
So please someone suggest whats going wrong here!
ejji09
Posts: 16
Joined: 17 Nov 2015, 08:54

Re: script to login into perforce and enter Username and Password

22 Feb 2018, 08:07

I dint get that ControlSend command. In this image you can see the window, can you guide me how to used the ControlSend command Image image url: https://ibb.co/mNndhc
wolf_II
Posts: 2688
Joined: 08 Feb 2015, 20:55

Re: script to login into perforce and enter Username and Password

22 Feb 2018, 11:47

I would try and run the script as admin. HTH
Jekko

Re: script to login into perforce and enter Username and Password

22 Feb 2018, 11:53

I think you must specify WHERE to send the login and password, so inspect the window with the AUTOIT Window spy, then:

ControlClick, [name of the control]
Send, %username%
ControlClick, [name of the control]
Send, %password%

Or just use Controlsend, as suggested before

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: aitaixy, Joey5 and 242 guests