script to login into perforce and enter Username and Password

Get help with using AutoHotkey and its commands and hotkeys
ejji09
Posts: 11
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] [Download] GeSHi © Codebox Plus

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: 11
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: 1911
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”

Who is online

Users browsing this forum: Meow, Murilo Pereira and 24 guests