ADVPL AutoHotKey AHK. Exemplo de marcro para protheus
global cUser := ""
global cPass := ""
global cUserVPN := ""
global cPassVPN := ""
global cWebAgent := "E:\Protheus12_TEC\web-agent1.0.16\web-agent.exe"
:*:**-::
Sleep 100
Send {Backspace}
Send {Backspace}
; SendRaw %cUser%
;Sleep 50
;Send {Tab}
;SendRaw %cPass%
;Sleep 150
;Send {Enter}
Clipboard := cUser
Send ^v
Send {Tab}
Sleep 200
Clipboard := cPass
Send ^v
Send {Enter}
Return
::**+::
SendRaw XXXXXXXXX
Return
+#p::
; Cria a GUI com três botões
Gui, Add, Text, x20 y20 w200 h30, Selecione uma opção:
Gui, Add, Button, x20 y60 w100 h30 gEscolherPRODUCAO, PRD
Gui, Add, Button, x140 y60 w100 h30 gEscolherPRDSCH, PRD SCHEDULE
Gui, Add, Button, x260 y60 w100 h30 gEscolherPRDREST, PRD REST
Gui, Add, Button, x20 y120 w100 h30 gEscolherTESTE, TST
;Gui, Add, Button, x140 y120 w100 h30 gEscolherTESTE, TST
Gui, Add, Button, x260 y120 w100 h30 gEscolherTSTREST, TST REST
Gui, Show, w390 h170, Selecione uma opção
Return
EscolherPRODUCAO()
{
cUser := "admin"
cPass := "sasa"
Run, %cWebAgent% launch "https://xaxa:222/rest/" --browser="C:\Program Files\Google\Chrome\Application\chrome.exe"
Gui, Destroy
}
EscolherPRDSCH()
{
cUser := "admin"
cPass := "www"
Run, %cWebAgent% launch "https://xaxa:222/rest/" --browser="C:\Program Files\Google\Chrome\Application\chrome.exe"
Gui, Destroy
}
EscolherPRDREST()
{
cUser := "admin"
cPass := "eee"
Run, %cWebAgent% launch "https://xaxa:222/rest/" --browser="C:\Program Files\Google\Chrome\Application\chrome.exe"
Gui, Destroy
}
EscolherTESTE()
{
cUser := "admin"
cPass := "eee"
Run, %cWebAgent% launch "https://xaxa:222/rest/" --browser="C:\Program Files\Google\Chrome\Application\chrome.exe"
Gui, Destroy
}
EscolherTSTREST()
{
cUser := "admin"
cPass := "rrr"
Run, %cWebAgent% launch "https://xaxa:222/rest/" --browser="C:\Program Files\Google\Chrome\Application\chrome.exe"
Gui, Destroy
}
Gostou? Compartilhe com seus amigos e deixe um comentário! 😎