Jump to content

mihai210

Members
  • Posts

    3
  • Joined

  • Last visited

About mihai210

  • Birthday 01/21/1988

mihai210's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. I put an empty function at the beginning of the script and when it suppose to beak I used if $result = 1 Then f2() to try to get it started from the beginning. I will watch extloop. Thanks
  2. #include <GUIConstantsEx.au3> SoundPlay("shadow.wav") Local $name = InputBox("Server Name", "Input server name ", "google.com", "", _ - 1, -1, 780, 312) If @error Then Return Remote() Func remote() ; Main Accounts Local $main = GUICreate("Shadow Remote v1.2",400,350,700,200) GUICtrlCreatePic("logo.jpg", 0, 0, 400, 350) GUICtrlSetState(-1,$GUI_DISABLE) Local $qwinsta= GUICtrlCreateButton ("Open Sessions",50,60,80,20) GUICtrlSetBkColor(-1, 0xFFFFFF) Local $connect = GUICtrlCreateButton ("Connect Session",260,60,90,20) GUICtrlSetBkColor(-1, 0xFFFFFF) Local $kill = GUICtrlCreateButton ("Close Session",260,90,90,20) GUICtrlSetBkColor(-1, 0xFFFFFF) Local $end = GUICtrlCreateButton("Terminate", 160, 280, 80, 20) GUICtrlSetBkColor(-1, 0xFFFFFF) ; Display the GUI. GUISetState(@SW_SHOW, $main) Local $iPID = 0 ; Loop until the user exits. While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop ;main cases case $qwinsta $iPID = qwinsta() case $connect $iPID = connect() case $kill $iPID = kill() case $end $iPID = end() EndSwitch WEnd ; Delete the previous GUI and all controls. GUIDelete($main) EndFunc ;==>Example ;main functions Func qwinsta() Run(@ComSpec & ' /k qwinsta.bat') Sleep(5000) Send("{space}") EndFunc Func connect() Local $session = InputBox("Session", "Input session number ", "", "", _ - 1, -1, 780, 312) $cmd= "MSTSC /Shadow:" & $session & " /Control /NoConsentPrompt" If @error Then Return RunWait('"' & @ComSpec & '" /k ' & $cmd) Sleep(1000) Send("exit") Send("{enter}") EndFunc Func kill() Local $session = InputBox("Session", "Input session number ", "", "", _ - 1, -1, 780, 312) $cmd= "rwinsta /server:" & $name & " " & $session If @error Then Return RunWait('"' & @ComSpec & '" /k ' & $cmd) EndFunc Func end() SoundPlay("shadow.wav") sleep(2200) exit EndFunc A GUI for server admins to connect a user´s session as admin without 3rd party software , previously is need to edit a GPO. I share it if anyone finds it useful or make it better. qwinsta.bat
  3. Hello to everyone I am relatively new to autoit script, I did a lot of research and mostly my script is formed by combining scripts and using the help file, so if it possible to help me with this one. When it gets clicked the row with the second book will open like first one so in need to get back to "while 1" to create a new directory and when "$nr" gets to 45 I need to scroll down and get pos of the las row i exported. i used image search #include <ImageSearch.au3> HotKeySet("{space}", "Terminate") #include <AutoItConstants.au3> f2() func f2() EndFunc $x1=0 $y1=0 MouseClick("left",242,249,1,1) ToolTip("mouse set") Sleep(400) While 1 $result = _ImageSearch("book.bmp",1,$x1,$y1,0) if $result=1 Then MouseMove($x1,$y1,3) MouseClick("left",$x1,$y1,1) ; folder name MouseMove(453,212,0) sleep(50) MouseClick("left",453,212,1,1) sleep(50) Send ("^a") Send ("^c") $fname = ClipGet() ; Folder code MouseMove(67,213,0) sleep(50) MouseClick("left",67,213,1,1) sleep(50) Send ("^a") Send ("^c") $fcode = ClipGet() ;create and open directory ToolTip("Mouse here") Sleep(1000) ToolTip("clicked on in") DirCreate("D:\DB\" & $fcode & " " & $fname) ShellExecute("D:\DB\" & $fcode & " " & $fname) Sleep(1000) MouseClick("left",$x1+100,$y1+16,1) ;Start copy $y1= $y1+16 elseif $result =0 Then $nr=0 f1() func f1() $locpart =$y1 While $locpart <>974 $locpart = $locpart + 16 $nr= $nr + 1 ;when $nr gets to 45 MouseWheel($MOUSE_WHEEL_down, 14) and reset mouse location MouseMove(220, $locpart ,1) MouseClick("left",220, $locpart,1) sleep(1000) ;break when second book if find and return to while 1 if $result = 1 Then f2() WinActivate("Selección de Parámetros") sleep(200) if WinActive("Selección de Parámetros") then Send ("{esc}") endif ToolTip("Mouse Here " & $nr) sleep(50) MouseMove(34,173,0) sleep(50) MouseDown($MOUSE_CLICK_LEFT) sleep(50) MouseMove(2464,339,0) ToolTip("mouse here") Sleep(50) MouseUp($MOUSE_CLICK_LEFT) WinActivate("Reemplazar u omitir archivos") sleep(200) if WinActive("Reemplazar u omitir archivos") then Send ("{esc}") endif WEnd EndFunc ;scroll ;else ;MouseWheel($MOUSE_WHEEL_down, 14) endif WEnd Func Terminate() SplashTextOn("Exit","EXIT PROGRAM") Sleep(600) Exit EndFunc ;==>Terminate
×
×
  • Create New...