Jump to content

install generator


cheatera
 Share

Recommended Posts

ok folx bcoz of my latest (most) posts in wich i did sumthing wrong, posted "bad" code, had a "fight" with devs (the "who" knows what im talking about) i decided to share ... if u look at my post u'll see nothing much: suggestions, opinions etc ... nothing "real" to share ... why i DONT like to share - most ppls here are sharks - w8ing for sumthing good, then steal it and get credits for it as their own ... thats a steal ... intellectual steal ... those ppls mind's are poor ... bad ... and i decided NEVER to share any of my projects ... as they only are in my "friends surroundings", nothing commercial with sells and etc ... but i rly dont feel like i gaved much to the other ppls in this forums: the good guys, wich are aways helpfull and wont steal the idea, they will even "develop" the idea, will make "good tings to the source, optimise it and etc ... so this is for the good guys ... as for the bad guys: F*ck u ...

ok this is only a PART from my bigger project, its ... kinda rough (like my most codes) but still worx and does whats made to do: generate install au3 files:

;// includes
#include <Misc.au3>
#Include <GuiIPAddress.au3>
#Include <GuiStatusBar.au3>
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <ProgressConstants.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>
#include <WindowsConstants.au3>
#include <EditConstants.au3>
#include <ListBoxConstants.au3>
#include <winApi.au3>
#include <GUIEdit.au3></P> <P>;// options
Opt("MouseCoordMode", "0")</P> <P>  $newprog_gui = GUICreate("new program configure", 427, 305)
  $np_tab_name_combo = GUICtrlCreateCombo("", 88, 8, 145, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL))
  GUICtrlSetData(-1, "tab1|tab2")
  $np_program_name_input = GUICtrlCreateInput("", 88, 40, 145, 21)
  $np_prog_path_input = GUICtrlCreateInput("", 8, 88, 377, 21, BitOR($ES_AUTOHSCROLL,$ES_READONLY))
  $np_browse_path_input = GUICtrlCreateButton("...", 384, 88, 27, 21, 0)
  $np_Group1 = GUICtrlCreateGroup("aditional options", 8, 112, 409, 153)
   $np_Radio1 = GUICtrlCreateRadio("start BEFORE instalation", 16, 128, 145, 17)
   $np_Radio2 = GUICtrlCreateRadio("start AFTER installation", 16, 144, 145, 17)
   GUICtrlSetState(-1, $GUI_CHECKED)
   $np_Label3 = GUICtrlCreateLabel("path to additional exe:", 16, 160, 108, 17)
   $np_aprog1_path_input = GUICtrlCreateInput("", 16, 184, 369, 21, BitOR($ES_AUTOHSCROLL,$ES_READONLY))
   $np_abrowse1_path_button = GUICtrlCreateButton("...", 384, 184, 27, 21, 0)
   $np_onemore_checkbox = GUICtrlCreateCheckbox("one more plz", 16, 208, 97, 17)
   $np_aprog2_path_input = GUICtrlCreateInput("", 16, 232, 369, 21, BitOR($ES_AUTOHSCROLL,$ES_READONLY))
   $np_abrowse2_path_button = GUICtrlCreateButton("...", 384, 232, 27, 21, 0)
   GUICtrlSetState(-1, $GUI_DISABLE)
  GUICtrlCreateGroup("", -99, -99, 1, 1)
  $np_run_button = GUICtrlCreateButton("install", 8, 272, 83, 25, 0)
  $np_Label1 = GUICtrlCreateLabel("store in this tab:", 8, 8, 78, 17)
  $np_label2222 = GUICtrlCreateLabel("program name:", 8, 40, 74, 17)
  $np_Label2 = GUICtrlCreateLabel("path to exe:", 8, 64, 60, 17)
  $np_cancel_button = GUICtrlCreateButton("cancel", 344, 272, 75, 25, 0)
  $np_newtab_button = GUICtrlCreateButton("new tab ...", 240, 8, 75, 21, 0)
  $np_Label4 = GUICtrlCreateLabel("priority", 240, 40, 34, 17)
  $np_priority_input = GUICtrlCreateInput("0", 280, 40, 48, 21, BitOR($ES_AUTOHSCROLL,$ES_NUMBER))
  $np_Updown1 = GUICtrlCreateUpdown($np_priority_input) 
  GUISetState(@SW_SHOW, $newprog_gui)
  
  $exit = 0
  Do
  $msg2 = GUIGetMsg()
   If $msg2 = $np_onemore_checkbox then
    If GUICtrlRead($np_onemore_checkbox) = $GUI_CHECKED then
     GUICtrlSetState($np_abrowse2_path_button, $GUI_ENABLE)
     GUICtrlSetState($np_aprog2_path_input, $GUI_ENABLE)
    Else
     GUICtrlSetState($np_abrowse2_path_button, $GUI_DISABLE)
     GUICtrlSetState($np_aprog2_path_input, $GUI_DISABLE)
    EndIf
   EndIf 
   If $msg2 = $np_browse_path_input then
    $file = FileOpenDialog("Browse for executable:", @ScriptDir & "\", "EXEcutables (*.exe;*.msi)", 1 + 2)
    GUICtrlSetData($np_prog_path_input, $file)
   EndIf
   If $msg2 = $np_abrowse1_path_button then
    $file = FileOpenDialog("Browse for executable:", @ScriptDir & "\", "EXEcutables (*.exe;*.msi)", 1 + 2)
    GUICtrlSetData($np_aprog1_path_input, $file)
   EndIf
   If $msg2 = $np_abrowse2_path_button then
    $file = FileOpenDialog("Browse for executable:", @ScriptDir & "\", "EXEcutables (*.exe;*.msi)", 1 + 2)
    GUICtrlSetData($np_aprog2_path_input, $file)
   EndIf
   If $msg2 = $np_cancel_button then
    $answer = MsgBox(4, "new program configure", "are you sure u want to exit? u will be prompted to install" & @CRLF & "this program next time u start csz - installator.")
    If $answer = 6 then
     $exit = 1
    EndIf
   EndIf
   If $msg2 = $np_run_button then
    If GUICtrlRead($np_tab_name_combo) = "" then
     MsgBox(0, "new program configure", "please choose in what tab to put the program.")
    Else
     If GUICtrlRead($np_program_name_input) = "" then
      MsgBox(0, "new program configure", "please input name for program.")
     ELse
      If GUICtrlRead($np_onemore_checkbox) = $GUI_CHECKED And GUICtrlRead($np_aprog2_path_input) = "" then
       MsgBox(0, "new program configure", "please input path for additional program.")
      Else
       If GUICtrlRead($np_prog_path_input) = "" then
        MsgBox(0, "new program configure", "please input path for main program.")
       Else
        If GUICtrlRead($np_Radio1) = $GUI_CHECKED then
         $np_time = "BEFORE"
        else
         $np_time = "AFTER"
        EndIf
        If GUICtrlRead($np_aprog1_path_input) = "" then
         $np_prog1 = "none"
        else
         $np_prog1 = GUICtrlRead($np_aprog1_path_input)
        EndIf
        If GUICtrlRead($np_onemore_checkbox) = $GUI_CHECKED then
         $np_prog2 = GUICtrlRead($np_aprog2_path_input)
        Else
         $np_prog2 = "none"
        EndIf
        $answer = MsgBox(4, "new program configure", "plaese confirm the following settings:" & @CRLF & "main program path: " & GUICtrlRead($np_prog_path_input) & @CRLF & "store program in tab: " & GUICtrlRead($np_tab_name_combo) & @CRLF & "program name: " & GUICtrlRead($np_program_name_input) & @CRLF & "run " & $np_time & " main program:" & @CRLF & "additional program1: " & $np_prog1 & @CRLF & "additional program2: " & $np_prog2)
        $main_prog_path = GUICtrlRead($np_prog_path_input)
        $main_prog_name = GUICtrlRead($np_program_name_input)
        $aditional_program1_path = GUICtrlRead($np_aprog1_path_input)
        $aditional_program2_path = GUICtrlRead($np_aprog2_path_input)
        If $answer = 6 then</P> <P>      Global $hSquare_GUI     = -1
         Global $hCtrl         = -1
         Global $Last_hControl   = -1
         Global $Frame_Color     = 0xFF0000
         Global $Frame_Width     = 3
         GUIRegisterMsg($WM_WINDOWPOSCHANGED, "WM_WINDOWPOSCHANGED")</P> <P>         $learning_gui = GUICreate("learning mode", 372, 252, 1, 1, -1, BitOR($WS_EX_TOOLWINDOW,$WS_EX_TOPMOST,$WS_EX_WINDOWEDGE))
         $lm_Group1 = GUICtrlCreateGroup("tracking", 0, 0, 329, 41)
          $lm_cc_button = GUICtrlCreateButton("control click", 88, 16, 75, 17, 0)
          $lm_ww_button = GUICtrlCreateButton("wait window", 8, 16, 75, 17, 0)
          $lm_wl_button = GUICtrlCreateButton("wait label", 168, 16, 75, 17, 0)
          $lm_wc_button = GUICtrlCreateButton("wait color", 248, 16, 75, 17, 0)
         GUICtrlCreateGroup("", -99, -99, 1, 1)
         $lm_Group2 = GUICtrlCreateGroup("info", 0, 80, 369, 97)
          $lm_label = GUICtrlCreateEdit("idle...", 8, 96, 349, 73)
         GUICtrlCreateGroup("", -99, -99, 1, 1)
         $lm_run_button = GUICtrlCreateButton("run", 336, 56, 27, 17, 0)
         $lm_list = GUICtrlCreateEdit("", 0, 184, 369, 45, BitOR($ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_READONLY,$WS_VSCROLL))
         $lm_finish_button = GUICtrlCreateButton("finish", 318, 232, 51, 17, 0)
         $lm_Group3 = GUICtrlCreateGroup("run external program", 0, 40, 369, 41)
          $lm_external_input = GUICtrlCreateInput("", 8, 56, 289, 17, BitOR($ES_AUTOHSCROLL,$ES_READONLY))
          $lm_external_button = GUICtrlCreateButton("...", 296, 56, 27, 17, 0)
         GUICtrlCreateGroup("", -99, -99, 1, 1)
         $lm_icon = GUICtrlCreateIcon(@ScriptDir & "\data\curr.ico", 0, 336, 8, 32, 32, BitOR($SS_NOTIFY,$WS_GROUP))
         $lm_special_combo = GUICtrlCreateCombo("", 168, 232, 145, 17, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL))
          GUICtrlSetData(-1, "close win|input sleep|send keys|kill process|wait process|mouse move")
         $lm_execute_button = GUICtrlCreateButton("execute >", 104, 232, 59, 17, 0)
         $lm_cancel_button = GUICtrlCreateButton("cancel", 0, 232, 51, 17, 0)</P> <P>        GUISetState(@SW_SHOW, $learning_gui)
         GUIDelete($newprog_gui)
         GUIswitch($learning_gui)
         GUICtrlSetData($lm_list, "Run('" & $main_prog_path & "')")</P> <P>     ;$list_items = GUICtrlRead($list)
         Run($main_prog_path)
         $win_arc = ""
         $in_exit = 0
         Do
         $msg3 = GUIGetMsg()
          If $msg3 = $lm_icon then
           _SetCursor(@ScriptDir & "\data\curr.cur", 32512)
           GUICtrlSetImage($lm_icon, @ScriptDir & "\data\nocurr.ico")
           While _IsPressed("01")
            Check_Highlight_Controls_Proc()
           WEnd
           $Last_hControl = -1
           _SetCursor(@ScriptDir & "\data\default.cur", 32512)
           GUICtrlSetImage($lm_icon, @ScriptDir & "\data\curr.ico")
          EndIf
          If $msg3 = $lm_ww_button then
           GUICtrlSetData($lm_list, GUICtrlRead($lm_list) & @CRLF & "WinWaitActive('" & $win_tittle & "')")
           $win_arc = $win_tittle
           _GUICtrlEdit_LineScroll($lm_list, 0, _GUICtrlEdit_GetLineCount($lm_list))
          EndIf
          If $msg3 = $lm_cc_button then 
           GUICtrlSetData($lm_list, GUICtrlRead($lm_list) & @CRLF & "ControlClick('" & $win_arc & "', '', " & $control_id & ")")
           _GUICtrlEdit_LineScroll($lm_list, 0, _GUICtrlEdit_GetLineCount($lm_list))
           WinActivate($win_arc)
           WinWaitActive($win_arc)
           ControlClick($win_arc, "", $control_id)
          EndIf
          if $msg3 = $lm_execute_button then
           if GUICtrlRead($lm_special_combo) = "" then;Or GUICtrlRead($special_combo) <> "close win" Or GUICtrlRead($special_combo) <> "input sleep" Or GUICtrlRead($special_combo) <> "send keys" Or GUICtrlRead($special_combo) <> "wait process" Or GUICtrlRead($special_combo) <> "kill process" Or GUICtrlRead($special_combo) <> ""  Or GUICtrlRead($special_combo) <> "mouse move" then
            MsgBox(0, "learning mode", "command NOT found ...")
           Else
            If GUICtrlRead($lm_special_combo) = "close win" then
             GUICtrlSetData($lm_list, GUICtrlRead($lm_list) & @CRLF & "WinWaitActive('" & $win_arc & "')")
             GUICtrlSetData($lm_list, GUICtrlRead($lm_list) & @CRLF & "WinClose('" & $win_arc & "')")
             _GUICtrlEdit_LineScroll($lm_list, 0, _GUICtrlEdit_GetLineCount($lm_list))
             WinActivate($win_arc)
             WinWaitActive($win_arc)
             WinClose($win_arc)
            EndIf
            If GUICtrlRead($lm_special_combo) = "input sleep" then
             $input = InputBox("learning mode - input sleep", "input sleep time in sec")
             If $input <> "" then 
              GUICtrlSetData($lm_list, GUICtrlRead($lm_list) & @CRLF & "Sleep('" & $input * 1000 & "')")
              _GUICtrlEdit_LineScroll($lm_list, 0, _GUICtrlEdit_GetLineCount($lm_list))
             EndIf
            EndIf
            If GUICtrlRead($lm_special_combo) = "send keys" then
             $input = InputBox("learning mode - send keys", "choose wich keys to send (READ manual!)")
             If $input <> "" then
              GUICtrlSetData($lm_list, GUICtrlRead($lm_list) & @CRLF & "Send('" & $input & "')")
              _GUICtrlEdit_LineScroll($lm_list, 0, _GUICtrlEdit_GetLineCount($lm_list))
              WinActivate($win_arc)
              WinWaitActive($win_arc)
              Send($input)
             EndIf
            EndIf
            If GUICtrlRead($lm_special_combo) = "kill process" then
             $proc_list = ProcessList()
             $process_list = ""
             for $i = 1 to $proc_list[0][0]
              $process_list = $process_list & @CRLF & $proc_list[$i][0] & ", PID = " & $proc_list[$i][1]
             next
             MsgBox(0, "learning mode - kill process", "choose wich process to kill AND remmeber its EXACT NAME (notepad.exe, setup.exe): " & @CRLF & $process_list)
             $input = InputBox("learning mode - kill process", "NAME of process to kill:")
             If $input <> "" then
              GUICtrlSetData($lm_list, GUICtrlRead($lm_list) & @CRLF & "ProcessClose('" & $input & "')")
              ProcessClose($input)
             EndIf
            EndIf
            If GUICtrlRead($lm_special_combo) = "wait process" then
             $input = InputBox("learning mode - wait process", "input a name of process. this will pause execution untill process is found.")
             If $input <> "" then
              GUICtrlSetData($lm_list, GUICtrlRead($lm_list) & @CRLF & "ProcessWait('" & $input & "')")
             EndIf
            EndIf
            If GUICtrlRead($lm_special_combo) = "mouse move" then
             MsgBox(0, "learning mode", "in next versions ...")
            EndIf
           EndIf
          EndIf
          If $msg3 = $lm_external_button then
           $path = FileOpenDialog("Browse for executable:", @ScriptDir & "\", "EXEcutables (*.exe;*.msi)", 1 + 2)
           GUICtrlSetData($lm_external_input, $path)
          EndIf
          If $msg3 = $lm_run_button then
           If GUICtrlRead($lm_external_input) = "" then
            MsgBox(0, "learning mode", "no program chosen ...")
           Else
            GUICtrlSetData($lm_list, GUICtrlRead($lm_list) & @CRLF & "Run('" & $path & "')")
            Run($path)
           EndIf
          EndIf
          If $msg3 = $lm_cancel_button then
           $answer = MsgBox(4, "learning mode", "are you sure u want to exit WITHOUT saving changes?")
           If $answer = 6 then
            $in_exit = 1
           EndIf
          EndIf
          If $msg3 = $lm_finish_button then
           FileWriteLine(@ScriptDir & "\data\" & $main_prog_name & ".au3", GUICtrlRead($lm_list))
          ;// ini
           $in_exit = 1
          EndIf
         Until $in_exit = 1
         GUIDelete($learning_gui)
         $exit = 1
        EndIf
       EndIF
      EndIF
     EndIF
    EndIf
   EndIf
  Until $exit = 1</P> <P>Func Check_Highlight_Controls_Proc()
    Local $hCtrl = _ControlGetHovered()
    Global $control_id
    Global $control_text
    Global $win_tittle</P> <P>  If $hCtrl <> 0 And $Last_hControl <> $hCtrl And $hSquare_GUI <> $hCtrl Then
        $Last_hControl = $hCtrl
        Local $aCtrlPos = WinGetPos($hCtrl)</P> <P>    ;GUICtrlSetData($Info_Edit, _
       ;   "X = " & $aCtrlPos[0] & @CRLF & _
       ;    "Y = " & $aCtrlPos[1] & @CRLF & _
       ;    "W = " & $aCtrlPos[2] & @CRLF & _
       ;    "H = " & $aCtrlPos[3] & @CRLF & @CRLF & _
       ;    "Control/Win Class Name: " & _WinGetClassName($hCtrl) & @CRLF & _
       ;    "Control/Win Handle: " & $hCtrl & @CRLF & _
       ;    "Control ID: " & _HwndToID($hCtrl) & @CRLF & @CRLF & _
       ;    "Control Data:" & @CRLF & ControlGetText($hCtrl, "", ""))
 GUICtrlSetData($lm_label, "wint tittle: " & WinGetTitle("[CLASS:" & _WinGetClassName($hCtrl) & "]", "") & " win class: " &  _WinGetClassName($hCtrl) & @CRLF & "highligted control: " & _HwndToID($hCtrl) & " text: " & ControlGetText($hCtrl, "", ""))
 $win_tittle = WinGetTitle("[CLASS:" & _WinGetClassName($hCtrl) & "]", "")
 $control_id = _HwndToID($hCtrl)
 $control_text = ControlGetText($hCtrl, "", "")
        GUIDeleteSquare($hSquare_GUI)
        $hSquare_GUI = GUICreateSquare($aCtrlPos[0], $aCtrlPos[1], $aCtrlPos[2], $aCtrlPos[3])
    EndIf
EndFunc</P> <P>Func GUICreateSquare($i_X=-1, $i_Y=-1, $i_W=-1, $i_H=-1)
    Local $hSquare_GUI = GUICreate("", $i_W, $i_H, $i_X, $i_Y, $WS_POPUP, $WS_EX_TOOLWINDOW+$WS_EX_TOPMOST)
    GUISetBkColor($Frame_Color)</P> <P> _GUISetHole($hSquare_GUI, $Frame_Width, $Frame_Width, $i_W - ($Frame_Width * 2), $i_H - ($Frame_Width * 2))</P> <P> GUISetState(@SW_SHOWNOACTIVATE, $hSquare_GUI)</P> <P>   Return $hSquare_GUI
EndFunc</P> <P>Func GUIDeleteSquare($hSquare_GUI)
    If IsHWnd($hSquare_GUI) And $hSquare_GUI <> $learning_GUI Then GUIDelete($hSquare_GUI)
EndFunc</P> <P>Func _ControlGetHovered()
    Local $aRet = DllCall("user32.dll", "int", "WindowFromPoint", "long", MouseGetPos(0), "long", MouseGetPos(1))
    If Not IsArray($aRet) Then Return SetError(1, 0, 0)
    Return HWnd($aRet[0])
EndFunc</P> <P>Func _HwndToID($hWnd)
    If Not IsHWnd($hWnd) Then Return SetError(1, 0, "")</P> <P> Local $aRet = DllCall("user32.dll", "int", "GetDlgCtrlID", "hwnd", $hWnd)
    If Not IsArray($aRet) Then Return SetError(2, 0, "")</P> <P>    Return $aRet[0]
EndFunc</P> <P>Func _WinGetClassName($hWnd)
    $aClassName = DLLCall("user32.dll", "int", "GetClassName", "hWnd", $hWnd, "str", "", "int", 64)
    If Not @error And $aClassName[0] <> 0 Then Return $aClassName[2]
    Return ""
EndFunc</P> <P>Func _GUISetHole($hWin, $i_X, $i_Y, $i_SizeW, $i_SizeH)
    Local $aWinPos, $Outer_Rgn, $Inner_Rgn, $Wh, $Combined_Rgn
    Local Const $RGN_DIFF = 4
    $aWinPos = WinGetPos($hWin)</P> <P> $Outer_Rgn = DllCall("gdi32.dll", "long", "CreateRectRgn", "long", 0, "long", 0, "long", $aWinPos[2], "long", $aWinPos[3])
    $Inner_Rgn = DllCall("gdi32.dll", "long", "CreateRectRgn", "long", $i_Y, "long", $i_Y, "long", $i_Y + $i_SizeW, _
            "long", $i_Y + $i_SizeH)
    $Combined_Rgn = DllCall("gdi32.dll", "long", "CreateRectRgn", "long", 0, "long", 0, "long", 0, "long", 0)
    DllCall("gdi32.dll", "long", "CombineRgn", "long", $Combined_Rgn[0], "long", $Outer_Rgn[0], "long", $Inner_Rgn[0], _
            "int", $RGN_DIFF)
    DllCall("user32.dll", "long", "SetWindowRgn", "hwnd", $hWin, "long", $Combined_Rgn[0], "int", 1)
EndFunc</P> <P>Func _IdleWait($IdleSec=0)
    Local $iSave, $stLastInput = DllStructCreate("uint;dword")
    DllStructSetData($stLastInput, 1, DllStructGetSize($stLastInput))
    DllCall("user32.dll", "int", "GetLastInputInfo", "ptr", DllStructGetPtr($stLastInput))
    Do
        $iSave = DllStructGetData($stLastInput, 2)
        Sleep(20)
        DllCall("user32.dll", "int", "GetLastInputInfo", "ptr", DllStructGetPtr($stLastInput))
    Until (DllStructGetData($stLastInput, 2) - $iSave) > $IdleSec
    Return DllStructGetData($stLastInput, 2) - $iSave
EndFunc</P> <P>Func WM_WINDOWPOSCHANGED($hWndGUI, $MsgID, $WParam, $LParam)
    If $hWndGUI <> $learning_GUI Then Return $GUI_RUNDEFMSG
    GUIDeleteSquare($hSquare_GUI)
    Check_Highlight_Controls_Proc()
    $Last_hControl = -1
EndFunc</P> <P>Func _SetCursor($s_file, $i_cursor)
   Local $newhcurs, $lResult
   $newhcurs = DllCall("user32.dll", "int", "LoadCursorFromFile", "str", $s_file)
   If Not @error Then
      $lResult = DllCall("user32.dll", "int", "SetSystemCursor", "int", $newhcurs[0], "int", $i_cursor)
      If Not @error Then
         $lResult = DllCall("user32.dll", "int", "DestroyCursor", "int", $newhcurs[0])
      Else
         MsgBox(0, "Error", "Failed SetSystemCursor")
      EndIf
   Else
      MsgBox(0, "Error", "Failed LoadCursorFromFile")
   EndIf
EndFunc ;==>_SetCursor

credits for highlight controls: MrCreator

ignore "tab" comb and priority - its a part of my bigger project, just lazy enough to DONT delete the "not needed", and alsto good guys will know how to fix it as for the bad guys "copy-paste-ah,my own" wont work ... they will still need to fix sum things.

so what it does?

its like autoir3windowtool wich higlhits, hwnd etc. steps:

1. AWAYS (so to u be sure that u are "control clicking" the right window) first do wait for window - drag to Window Title (not to anywhere window it self) and click win wait

2. find control using "finder tool" then control click it, the program it self "does" the last few commands - it will find the window tittle and then click on the control (look ar info editbox, it says what are u hoovering atm)

3. control click, close win, send keys, kill process, sleep etc ("execute> " combobox) till u are finished, then click finish

u are done ... u will find the generated au3 code to install this program in \data\name_that_u_gived_at_program_name_input.au3. uninstall the software just to be sure there wont be any "unknown" windowses by the generated file bcoz the first time u installed and generated, the software u install just wasnt there :lmao: when uninstalled software - run au3 file, sit back and enjoy :)

provided "data" files needed to run program correctly, download the rar file, code here is just for showing it.

so i may be in wrong section (example scripts) but i dont need help on this - i know how to do it (as i said its a part from my bigger project wich i wont share ... for now) i just wanted to give u and "example script" of not only program installs, it can automane everything (as autoit can :think: ). lazy again to complete wait for label, wait for color change, and mouse move ... will do it l8er have other projects on my mind now, so who-ever-is-interested - share your ideas here. btw in send keys execute combo - use standart autoit send keys funciotn - if u need to send enter - in the input box type {ENTER} etc ...

well thats it for now ... sharing .... hope i WONT regret it ... bb /salute (to good guys ONLY)

ps: s0z f0r m3 b4d 3ngl|sh

install_generator.rar

Is There A Life BEFORE Death?im stupidSaved warn logs: cheateraSmOke_N Note Added 17 January 2009 - 02:54 PM Added to warn level Posting a way to hack the registry and force sending someones desktop via TCP. Jos Note Added 25 November 2008 - 02:52 PM Added to warn level for being an impolite rookie.once a year i go bad ... what will happen in 2010??[u]Its GOOD to be BAD ... (Warlock's Succubus - World of Warcraft)[/u]

Link to comment
Share on other sites

90 views, 10 downloadz, and 0 comments... looks like bad guyz are preventing...

Is There A Life BEFORE Death?im stupidSaved warn logs: cheateraSmOke_N Note Added 17 January 2009 - 02:54 PM Added to warn level Posting a way to hack the registry and force sending someones desktop via TCP. Jos Note Added 25 November 2008 - 02:52 PM Added to warn level for being an impolite rookie.once a year i go bad ... what will happen in 2010??[u]Its GOOD to be BAD ... (Warlock's Succubus - World of Warcraft)[/u]

Link to comment
Share on other sites

Considering your "location" you have a good english knowledge but you are ignoring sentences, capitals and other grammar rules which are THE SAME no matter what your native language is; all I see is a "wall of text"

Take your time when writing a post and try to spell it properly (I know you can do it), don't be lazy - it will really help you.

About the code?

Please do your job when posting and be sure it does not contain errors.

- first: you have alot of </P> <P> tags which doesn't belong to the code (and some other tag remains)

- second - your code itself has errors (syntax, variables not declared ...)

I'm afraid I can't aford to waste time to fix your code - it might prove to be something good, or not.

I apologize for being "blunt" but it looked to me that you could need a "cold shower".

Thank you for willig to share this code with us; unfortunately, until the code is not fixed it can't be tested.

SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

Link to comment
Share on other sites

as i said, the source here is only for showing it, i dont know why it has those mistakes (<p></p> and etc) i dont know very well html, but i think thos etags are there bcoz of the "codebox" and etc ... i only type "codebox copy-pasted the source codebox" ... the source isnt broken it doesnt needs a fix ;) i said download the rar file bcoz it needs the resources from there too :) so download it and u'll see working source. let me try another codebox/autoit

;// includes
#include <Misc.au3>
#Include <GuiIPAddress.au3>
#Include <GuiStatusBar.au3>
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <ProgressConstants.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>
#include <WindowsConstants.au3>
#include <EditConstants.au3>
#include <ListBoxConstants.au3>
#include <winApi.au3>
#include <GUIEdit.au3>

;// options
Opt("MouseCoordMode", "0")

  $newprog_gui = GUICreate("new program configure", 427, 305)
  $np_tab_name_combo = GUICtrlCreateCombo("", 88, 8, 145, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL))
  GUICtrlSetData(-1, "tab1|tab2")
  $np_program_name_input = GUICtrlCreateInput("", 88, 40, 145, 21)
  $np_prog_path_input = GUICtrlCreateInput("", 8, 88, 377, 21, BitOR($ES_AUTOHSCROLL,$ES_READONLY))
  $np_browse_path_input = GUICtrlCreateButton("...", 384, 88, 27, 21, 0)
  $np_Group1 = GUICtrlCreateGroup("aditional options", 8, 112, 409, 153)
   $np_Radio1 = GUICtrlCreateRadio("start BEFORE instalation", 16, 128, 145, 17)
   $np_Radio2 = GUICtrlCreateRadio("start AFTER installation", 16, 144, 145, 17)
   GUICtrlSetState(-1, $GUI_CHECKED)
   $np_Label3 = GUICtrlCreateLabel("path to additional exe:", 16, 160, 108, 17)
   $np_aprog1_path_input = GUICtrlCreateInput("", 16, 184, 369, 21, BitOR($ES_AUTOHSCROLL,$ES_READONLY))
   $np_abrowse1_path_button = GUICtrlCreateButton("...", 384, 184, 27, 21, 0)
   $np_onemore_checkbox = GUICtrlCreateCheckbox("one more plz", 16, 208, 97, 17)
   $np_aprog2_path_input = GUICtrlCreateInput("", 16, 232, 369, 21, BitOR($ES_AUTOHSCROLL,$ES_READONLY))
   $np_abrowse2_path_button = GUICtrlCreateButton("...", 384, 232, 27, 21, 0)
   GUICtrlSetState(-1, $GUI_DISABLE)
  GUICtrlCreateGroup("", -99, -99, 1, 1)
  $np_run_button = GUICtrlCreateButton("install", 8, 272, 83, 25, 0)
  $np_Label1 = GUICtrlCreateLabel("store in this tab:", 8, 8, 78, 17)
  $np_label2222 = GUICtrlCreateLabel("program name:", 8, 40, 74, 17)
  $np_Label2 = GUICtrlCreateLabel("path to exe:", 8, 64, 60, 17)
  $np_cancel_button = GUICtrlCreateButton("cancel", 344, 272, 75, 25, 0)
  $np_newtab_button = GUICtrlCreateButton("new tab ...", 240, 8, 75, 21, 0)
  $np_Label4 = GUICtrlCreateLabel("priority", 240, 40, 34, 17)
  $np_priority_input = GUICtrlCreateInput("0", 280, 40, 48, 21, BitOR($ES_AUTOHSCROLL,$ES_NUMBER))
  $np_Updown1 = GUICtrlCreateUpdown($np_priority_input) 
  GUISetState(@SW_SHOW, $newprog_gui)
  
  $exit = 0
  Do
  $msg2 = GUIGetMsg()
   If $msg2 = $np_onemore_checkbox then
    If GUICtrlRead($np_onemore_checkbox) = $GUI_CHECKED then
     GUICtrlSetState($np_abrowse2_path_button, $GUI_ENABLE)
     GUICtrlSetState($np_aprog2_path_input, $GUI_ENABLE)
    Else
     GUICtrlSetState($np_abrowse2_path_button, $GUI_DISABLE)
     GUICtrlSetState($np_aprog2_path_input, $GUI_DISABLE)
    EndIf
   EndIf 
   If $msg2 = $np_browse_path_input then
    $file = FileOpenDialog("Browse for executable:", @ScriptDir & "\", "EXEcutables (*.exe;*.msi)", 1 + 2)
    GUICtrlSetData($np_prog_path_input, $file)
   EndIf
   If $msg2 = $np_abrowse1_path_button then
    $file = FileOpenDialog("Browse for executable:", @ScriptDir & "\", "EXEcutables (*.exe;*.msi)", 1 + 2)
    GUICtrlSetData($np_aprog1_path_input, $file)
   EndIf
   If $msg2 = $np_abrowse2_path_button then
    $file = FileOpenDialog("Browse for executable:", @ScriptDir & "\", "EXEcutables (*.exe;*.msi)", 1 + 2)
    GUICtrlSetData($np_aprog2_path_input, $file)
   EndIf
   If $msg2 = $np_cancel_button then
    $answer = MsgBox(4, "new program configure", "are you sure u want to exit? u will be prompted to install" & @CRLF & "this program next time u start csz - installator.")
    If $answer = 6 then
     $exit = 1
    EndIf
   EndIf
   If $msg2 = $np_run_button then
    If GUICtrlRead($np_tab_name_combo) = "" then
     MsgBox(0, "new program configure", "please choose in what tab to put the program.")
    Else
     If GUICtrlRead($np_program_name_input) = "" then
      MsgBox(0, "new program configure", "please input name for program.")
     ELse
      If GUICtrlRead($np_onemore_checkbox) = $GUI_CHECKED And GUICtrlRead($np_aprog2_path_input) = "" then
       MsgBox(0, "new program configure", "please input path for additional program.")
      Else
       If GUICtrlRead($np_prog_path_input) = "" then
        MsgBox(0, "new program configure", "please input path for main program.")
       Else
        If GUICtrlRead($np_Radio1) = $GUI_CHECKED then
         $np_time = "BEFORE"
        else
         $np_time = "AFTER"
        EndIf
        If GUICtrlRead($np_aprog1_path_input) = "" then
         $np_prog1 = "none"
        else
         $np_prog1 = GUICtrlRead($np_aprog1_path_input)
        EndIf
        If GUICtrlRead($np_onemore_checkbox) = $GUI_CHECKED then
         $np_prog2 = GUICtrlRead($np_aprog2_path_input)
        Else
         $np_prog2 = "none"
        EndIf
        $answer = MsgBox(4, "new program configure", "plaese confirm the following settings:" & @CRLF & "main program path: " & GUICtrlRead($np_prog_path_input) & @CRLF & "store program in tab: " & GUICtrlRead($np_tab_name_combo) & @CRLF & "program name: " & GUICtrlRead($np_program_name_input) & @CRLF & "run " & $np_time & " main program:" & @CRLF & "additional program1: " & $np_prog1 & @CRLF & "additional program2: " & $np_prog2)
        $main_prog_path = GUICtrlRead($np_prog_path_input)
        $main_prog_name = GUICtrlRead($np_program_name_input)
        $aditional_program1_path = GUICtrlRead($np_aprog1_path_input)
        $aditional_program2_path = GUICtrlRead($np_aprog2_path_input)
        If $answer = 6 then

         Global $hSquare_GUI     = -1
         Global $hCtrl           = -1
         Global $Last_hControl   = -1
         Global $Frame_Color     = 0xFF0000
         Global $Frame_Width     = 3
         GUIRegisterMsg($WM_WINDOWPOSCHANGED, "WM_WINDOWPOSCHANGED")

         $learning_gui = GUICreate("learning mode", 372, 252, 1, 1, -1, BitOR($WS_EX_TOOLWINDOW,$WS_EX_TOPMOST,$WS_EX_WINDOWEDGE))
         $lm_Group1 = GUICtrlCreateGroup("tracking", 0, 0, 329, 41)
          $lm_cc_button = GUICtrlCreateButton("control click", 88, 16, 75, 17, 0)
          $lm_ww_button = GUICtrlCreateButton("wait window", 8, 16, 75, 17, 0)
          $lm_wl_button = GUICtrlCreateButton("wait label", 168, 16, 75, 17, 0)
          $lm_wc_button = GUICtrlCreateButton("wait color", 248, 16, 75, 17, 0)
         GUICtrlCreateGroup("", -99, -99, 1, 1)
         $lm_Group2 = GUICtrlCreateGroup("info", 0, 80, 369, 97)
          $lm_label = GUICtrlCreateEdit("idle...", 8, 96, 349, 73)
         GUICtrlCreateGroup("", -99, -99, 1, 1)
         $lm_run_button = GUICtrlCreateButton("run", 336, 56, 27, 17, 0)
         $lm_list = GUICtrlCreateEdit("", 0, 184, 369, 45, BitOR($ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_READONLY,$WS_VSCROLL))
         $lm_finish_button = GUICtrlCreateButton("finish", 318, 232, 51, 17, 0)
         $lm_Group3 = GUICtrlCreateGroup("run external program", 0, 40, 369, 41)
          $lm_external_input = GUICtrlCreateInput("", 8, 56, 289, 17, BitOR($ES_AUTOHSCROLL,$ES_READONLY))
          $lm_external_button = GUICtrlCreateButton("...", 296, 56, 27, 17, 0)
         GUICtrlCreateGroup("", -99, -99, 1, 1)
         $lm_icon = GUICtrlCreateIcon(@ScriptDir & "\data\curr.ico", 0, 336, 8, 32, 32, BitOR($SS_NOTIFY,$WS_GROUP))
         $lm_special_combo = GUICtrlCreateCombo("", 168, 232, 145, 17, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL))
          GUICtrlSetData(-1, "close win|input sleep|send keys|kill process|wait process|mouse move")
         $lm_execute_button = GUICtrlCreateButton("execute >", 104, 232, 59, 17, 0)
         $lm_cancel_button = GUICtrlCreateButton("cancel", 0, 232, 51, 17, 0)

         GUISetState(@SW_SHOW, $learning_gui)
         GUIDelete($newprog_gui)
         GUIswitch($learning_gui)
         GUICtrlSetData($lm_list, "Run('" & $main_prog_path & "')")

         ;$list_items = GUICtrlRead($list)
         Run($main_prog_path)
         $win_arc = ""
         $in_exit = 0
         Do
         $msg3 = GUIGetMsg()
          If $msg3 = $lm_icon then
           _SetCursor(@ScriptDir & "\data\curr.cur", 32512)
           GUICtrlSetImage($lm_icon, @ScriptDir & "\data\nocurr.ico")
           While _IsPressed("01")
            Check_Highlight_Controls_Proc()
           WEnd
           $Last_hControl = -1
           _SetCursor(@ScriptDir & "\data\default.cur", 32512)
           GUICtrlSetImage($lm_icon, @ScriptDir & "\data\curr.ico")
          EndIf
          If $msg3 = $lm_ww_button then
           GUICtrlSetData($lm_list, GUICtrlRead($lm_list) & @CRLF & "WinWaitActive('" & $win_tittle & "')")
           $win_arc = $win_tittle
           _GUICtrlEdit_LineScroll($lm_list, 0, _GUICtrlEdit_GetLineCount($lm_list))
          EndIf
          If $msg3 = $lm_cc_button then 
           GUICtrlSetData($lm_list, GUICtrlRead($lm_list) & @CRLF & "ControlClick('" & $win_arc & "', '', " & $control_id & ")")
           _GUICtrlEdit_LineScroll($lm_list, 0, _GUICtrlEdit_GetLineCount($lm_list))
           WinActivate($win_arc)
           WinWaitActive($win_arc)
           ControlClick($win_arc, "", $control_id)
          EndIf
          if $msg3 = $lm_execute_button then
           if GUICtrlRead($lm_special_combo) = "" then ;Or GUICtrlRead($special_combo) <> "close win" Or GUICtrlRead($special_combo) <> "input sleep" Or GUICtrlRead($special_combo) <> "send keys" Or GUICtrlRead($special_combo) <> "wait process" Or GUICtrlRead($special_combo) <> "kill process" Or GUICtrlRead($special_combo) <> ""  Or GUICtrlRead($special_combo) <> "mouse move" then
            MsgBox(0, "learning mode", "command NOT found ...")
           Else
            If GUICtrlRead($lm_special_combo) = "close win" then
             GUICtrlSetData($lm_list, GUICtrlRead($lm_list) & @CRLF & "WinWaitActive('" & $win_arc & "')")
             GUICtrlSetData($lm_list, GUICtrlRead($lm_list) & @CRLF & "WinClose('" & $win_arc & "')")
             _GUICtrlEdit_LineScroll($lm_list, 0, _GUICtrlEdit_GetLineCount($lm_list))
             WinActivate($win_arc)
             WinWaitActive($win_arc)
             WinClose($win_arc)
            EndIf
            If GUICtrlRead($lm_special_combo) = "input sleep" then
             $input = InputBox("learning mode - input sleep", "input sleep time in sec")
             If $input <> "" then 
              GUICtrlSetData($lm_list, GUICtrlRead($lm_list) & @CRLF & "Sleep('" & $input * 1000 & "')")
              _GUICtrlEdit_LineScroll($lm_list, 0, _GUICtrlEdit_GetLineCount($lm_list))
             EndIf
            EndIf
            If GUICtrlRead($lm_special_combo) = "send keys" then
             $input = InputBox("learning mode - send keys", "choose wich keys to send (READ manual!)")
             If $input <> "" then
              GUICtrlSetData($lm_list, GUICtrlRead($lm_list) & @CRLF & "Send('" & $input & "')")
              _GUICtrlEdit_LineScroll($lm_list, 0, _GUICtrlEdit_GetLineCount($lm_list))
              WinActivate($win_arc)
              WinWaitActive($win_arc)
              Send($input)
             EndIf
            EndIf
            If GUICtrlRead($lm_special_combo) = "kill process" then
             $proc_list = ProcessList()
             $process_list = ""
             for $i = 1 to $proc_list[0][0]
              $process_list = $process_list & @CRLF & $proc_list[$i][0] & ", PID = " & $proc_list[$i][1]
             next
             MsgBox(0, "learning mode - kill process", "choose wich process to kill AND remmeber its EXACT NAME (notepad.exe, setup.exe): " & @CRLF & $process_list)
             $input = InputBox("learning mode - kill process", "NAME of process to kill:")
             If $input <> "" then
              GUICtrlSetData($lm_list, GUICtrlRead($lm_list) & @CRLF & "ProcessClose('" & $input & "')")
              ProcessClose($input)
             EndIf
            EndIf
            If GUICtrlRead($lm_special_combo) = "wait process" then
             $input = InputBox("learning mode - wait process", "input a name of process. this will pause execution untill process is found.")
             If $input <> "" then
              GUICtrlSetData($lm_list, GUICtrlRead($lm_list) & @CRLF & "ProcessWait('" & $input & "')")
             EndIf
            EndIf
            If GUICtrlRead($lm_special_combo) = "mouse move" then
             MsgBox(0, "learning mode", "in next versions ...")
            EndIf
           EndIf
          EndIf
          If $msg3 = $lm_external_button then
           $path = FileOpenDialog("Browse for executable:", @ScriptDir & "\", "EXEcutables (*.exe;*.msi)", 1 + 2)
           GUICtrlSetData($lm_external_input, $path)
          EndIf
          If $msg3 = $lm_run_button then
           If GUICtrlRead($lm_external_input) = "" then
            MsgBox(0, "learning mode", "no program chosen ...")
           Else
            GUICtrlSetData($lm_list, GUICtrlRead($lm_list) & @CRLF & "Run('" & $path & "')")
            Run($path)
           EndIf
          EndIf
          If $msg3 = $lm_cancel_button then
           $answer = MsgBox(4, "learning mode", "are you sure u want to exit WITHOUT saving changes?")
           If $answer = 6 then
            $in_exit = 1
           EndIf
          EndIf
          If $msg3 = $lm_finish_button then
           FileWriteLine(@ScriptDir & "\data\" & $main_prog_name & ".au3", GUICtrlRead($lm_list))
           ;// ini
           $in_exit = 1
          EndIf
         Until $in_exit = 1
         GUIDelete($learning_gui)
         $exit = 1
        EndIf
       EndIF
      EndIF
     EndIF
    EndIf
   EndIf
  Until $exit = 1

Func Check_Highlight_Controls_Proc()
    Local $hCtrl = _ControlGetHovered()
    Global $control_id
    Global $control_text
    Global $win_tittle

    If $hCtrl <> 0 And $Last_hControl <> $hCtrl And $hSquare_GUI <> $hCtrl Then
        $Last_hControl = $hCtrl
        Local $aCtrlPos = WinGetPos($hCtrl)

        ;GUICtrlSetData($Info_Edit, _
        ;   "X = " & $aCtrlPos[0] & @CRLF & _
        ;    "Y = " & $aCtrlPos[1] & @CRLF & _
        ;    "W = " & $aCtrlPos[2] & @CRLF & _
        ;    "H = " & $aCtrlPos[3] & @CRLF & @CRLF & _
        ;    "Control/Win Class Name: " & _WinGetClassName($hCtrl) & @CRLF & _
        ;    "Control/Win Handle: " & $hCtrl & @CRLF & _
        ;    "Control ID: " & _HwndToID($hCtrl) & @CRLF & @CRLF & _
        ;    "Control Data:" & @CRLF & ControlGetText($hCtrl, "", ""))
 GUICtrlSetData($lm_label, "wint tittle: " & WinGetTitle("[CLASS:" & _WinGetClassName($hCtrl) & "]", "") & " win class: " &  _WinGetClassName($hCtrl) & @CRLF & "highligted control: " & _HwndToID($hCtrl) & " text: " & ControlGetText($hCtrl, "", ""))
 $win_tittle = WinGetTitle("[CLASS:" & _WinGetClassName($hCtrl) & "]", "")
 $control_id = _HwndToID($hCtrl)
 $control_text = ControlGetText($hCtrl, "", "")
        GUIDeleteSquare($hSquare_GUI)
        $hSquare_GUI = GUICreateSquare($aCtrlPos[0], $aCtrlPos[1], $aCtrlPos[2], $aCtrlPos[3])
    EndIf
EndFunc

Func GUICreateSquare($i_X=-1, $i_Y=-1, $i_W=-1, $i_H=-1)
    Local $hSquare_GUI = GUICreate("", $i_W, $i_H, $i_X, $i_Y, $WS_POPUP, $WS_EX_TOOLWINDOW+$WS_EX_TOPMOST)
    GUISetBkColor($Frame_Color)

    _GUISetHole($hSquare_GUI, $Frame_Width, $Frame_Width, $i_W - ($Frame_Width * 2), $i_H - ($Frame_Width * 2))

    GUISetState(@SW_SHOWNOACTIVATE, $hSquare_GUI)

    Return $hSquare_GUI
EndFunc

Func GUIDeleteSquare($hSquare_GUI)
    If IsHWnd($hSquare_GUI) And $hSquare_GUI <> $learning_GUI Then GUIDelete($hSquare_GUI)
EndFunc

Func _ControlGetHovered()
    Local $aRet = DllCall("user32.dll", "int", "WindowFromPoint", "long", MouseGetPos(0), "long", MouseGetPos(1))
    If Not IsArray($aRet) Then Return SetError(1, 0, 0)
    Return HWnd($aRet[0])
EndFunc

Func _HwndToID($hWnd)
    If Not IsHWnd($hWnd) Then Return SetError(1, 0, "")

    Local $aRet = DllCall("user32.dll", "int", "GetDlgCtrlID", "hwnd", $hWnd)
    If Not IsArray($aRet) Then Return SetError(2, 0, "")

    Return $aRet[0]
EndFunc

Func _WinGetClassName($hWnd)
    $aClassName = DLLCall("user32.dll", "int", "GetClassName", "hWnd", $hWnd, "str", "", "int", 64)
    If Not @error And $aClassName[0] <> 0 Then Return $aClassName[2]
    Return ""
EndFunc

Func _GUISetHole($hWin, $i_X, $i_Y, $i_SizeW, $i_SizeH)
    Local $aWinPos, $Outer_Rgn, $Inner_Rgn, $Wh, $Combined_Rgn
    Local Const $RGN_DIFF = 4
    $aWinPos = WinGetPos($hWin)

    $Outer_Rgn = DllCall("gdi32.dll", "long", "CreateRectRgn", "long", 0, "long", 0, "long", $aWinPos[2], "long", $aWinPos[3])
    $Inner_Rgn = DllCall("gdi32.dll", "long", "CreateRectRgn", "long", $i_Y, "long", $i_Y, "long", $i_Y + $i_SizeW, _
            "long", $i_Y + $i_SizeH)
    $Combined_Rgn = DllCall("gdi32.dll", "long", "CreateRectRgn", "long", 0, "long", 0, "long", 0, "long", 0)
    DllCall("gdi32.dll", "long", "CombineRgn", "long", $Combined_Rgn[0], "long", $Outer_Rgn[0], "long", $Inner_Rgn[0], _
            "int", $RGN_DIFF)
    DllCall("user32.dll", "long", "SetWindowRgn", "hwnd", $hWin, "long", $Combined_Rgn[0], "int", 1)
EndFunc

Func _IdleWait($IdleSec=0)
    Local $iSave, $stLastInput = DllStructCreate("uint;dword")
    DllStructSetData($stLastInput, 1, DllStructGetSize($stLastInput))
    DllCall("user32.dll", "int", "GetLastInputInfo", "ptr", DllStructGetPtr($stLastInput))
    Do
        $iSave = DllStructGetData($stLastInput, 2)
        Sleep(20)
        DllCall("user32.dll", "int", "GetLastInputInfo", "ptr", DllStructGetPtr($stLastInput))
    Until (DllStructGetData($stLastInput, 2) - $iSave) > $IdleSec
    Return DllStructGetData($stLastInput, 2) - $iSave
EndFunc

Func WM_WINDOWPOSCHANGED($hWndGUI, $MsgID, $WParam, $LParam)
    If $hWndGUI <> $learning_GUI Then Return $GUI_RUNDEFMSG
    GUIDeleteSquare($hSquare_GUI)
    Check_Highlight_Controls_Proc()
    $Last_hControl = -1
EndFunc

Func _SetCursor($s_file, $i_cursor)
   Local $newhcurs, $lResult
   $newhcurs = DllCall("user32.dll", "int", "LoadCursorFromFile", "str", $s_file)
   If Not @error Then
      $lResult = DllCall("user32.dll", "int", "SetSystemCursor", "int", $newhcurs[0], "int", $i_cursor)
      If Not @error Then
         $lResult = DllCall("user32.dll", "int", "DestroyCursor", "int", $newhcurs[0])
      Else
         MsgBox(0, "Error", "Failed SetSystemCursor")
      EndIf
   Else
      MsgBox(0, "Error", "Failed LoadCursorFromFile")
   EndIf
EndFunc  ;==>_SetCursor

edit: well, its showing good now /edit

ps: s0z f0r m3 b4d 3ngl|sh

Edited by cheatera

Is There A Life BEFORE Death?im stupidSaved warn logs: cheateraSmOke_N Note Added 17 January 2009 - 02:54 PM Added to warn level Posting a way to hack the registry and force sending someones desktop via TCP. Jos Note Added 25 November 2008 - 02:52 PM Added to warn level for being an impolite rookie.once a year i go bad ... what will happen in 2010??[u]Its GOOD to be BAD ... (Warlock's Succubus - World of Warcraft)[/u]

Link to comment
Share on other sites

  • 4 weeks later...

atleast say it sux

Is There A Life BEFORE Death?im stupidSaved warn logs: cheateraSmOke_N Note Added 17 January 2009 - 02:54 PM Added to warn level Posting a way to hack the registry and force sending someones desktop via TCP. Jos Note Added 25 November 2008 - 02:52 PM Added to warn level for being an impolite rookie.once a year i go bad ... what will happen in 2010??[u]Its GOOD to be BAD ... (Warlock's Succubus - World of Warcraft)[/u]

Link to comment
Share on other sites

What "sux" is that I have no idea what the script is supposed to do. I ran it, stumbled through a few clicks and options and then didn't know where to go from there. I know that English isn't your first language but long rambling posts are not helping you here :P

Link to comment
Share on other sites

so what it does?

its like autoir3windowtool wich higlhits, hwnd etc. steps:

1. AWAYS (so to u be sure that u are "control clicking" the right window) first do wait for window - drag to Window Title (not to anywhere window it self) and click win wait

2. find control using "finder tool" then control click it, the program it self "does" the last few commands - it will find the window tittle and then click on the control (look ar info editbox, it says what are u hoovering atm)

3. control click, close win, send keys, kill process, sleep etc ("execute> " combobox) till u are finished, then click finish

u are done ... u will find the generated au3 code to install this program in \data\name_that_u_gived_at_program_name_input.au3. uninstall the software just to be sure there wont be any "unknown" windowses by the generated file bcoz the first time u installed and generated, the software u install just wasnt there :unsure: when uninstalled software - run au3 file, sit back and enjoy :P

provided "data" files needed to run program correctly, download the rar file, code here is just for showing it.

so i may be in wrong section (example scripts) but i dont need help on this - i know how to do it (as i said its a part from my bigger project wich i wont share ... for now) i just wanted to give u and "example script" of not only program installs, it can automane everything (as autoit can :D ). lazy again to complete wait for label, wait for color change, and mouse move ... will do it l8er have other projects on my mind now, so who-ever-is-interested - share your ideas here. btw in send keys execute combo - use standart autoit send keys funciotn - if u need to send enter - in the input box type {ENTER} etc ...

Is There A Life BEFORE Death?im stupidSaved warn logs: cheateraSmOke_N Note Added 17 January 2009 - 02:54 PM Added to warn level Posting a way to hack the registry and force sending someones desktop via TCP. Jos Note Added 25 November 2008 - 02:52 PM Added to warn level for being an impolite rookie.once a year i go bad ... what will happen in 2010??[u]Its GOOD to be BAD ... (Warlock's Succubus - World of Warcraft)[/u]

Link to comment
Share on other sites

  • 4 weeks later...

guys, its kinda lame to "self-answer" my posts. PLEASE add some comment ... or suggestion ... or critic ... or whatever! 123 downloads! i want to know it is useful to you or not ...

Edited by cheatera

Is There A Life BEFORE Death?im stupidSaved warn logs: cheateraSmOke_N Note Added 17 January 2009 - 02:54 PM Added to warn level Posting a way to hack the registry and force sending someones desktop via TCP. Jos Note Added 25 November 2008 - 02:52 PM Added to warn level for being an impolite rookie.once a year i go bad ... what will happen in 2010??[u]Its GOOD to be BAD ... (Warlock's Succubus - World of Warcraft)[/u]

Link to comment
Share on other sites

guys, its kinda lame to "self-answer" my posts. PLEASE add some comment ... or suggestion ... or critic ... or whatever! 123 downloads! i want to know it is useful to you or not ...

I tried it out it's a bit like AU3recorder to capture controlclick e.c.t i used convertxtodvd as an example but i still cannot get it to automate install sorry,

but i will keep trying because convertx is one program i still cant get going with AU3recorder or anything else.

Link to comment
Share on other sites

Hi cheatera

I played with this when I first found it and found it confusing but I've learned a little more since then. :-)

It does help a lot in creating install scripts, well done.

a couple of suggestions.

1. Don't make it manditory that you have to put the install program path in or start it.

Reason: This maybe the second or thrid time through or I may just want to capture a differnt button to click. If I already have the screen up then I don't have to start it again.

2. Add ControlCommand.

Reason: For setting check boxes, etc

3. If the TAB drop down on the first page isn't needed remove it. What is/was it for?

(I can't find anywhere it is used in the code.)

I have had problems with the program I tried it out on Ccleaner. I was trying to automate a "registry scan".

I know this isn't an install but I think this is another great use for your script.

I can't select "with the cross hairs" the "registry" button on the left hand side.

When I tried to use "send key" ({alt}g) the program just beeped at me and didn't do anything to the Ccleaner window.

Thanks for the script it's making things a lot easier for me

John Morrison

Link to comment
Share on other sites

@all: ok folx, i maybe rushed things a little. promissing to explain all tomorrow better (too tired atm).

@urie: ok will explain better, actually its pretty easy using.

@storme: 1. ok. will add checkbox for already running application, so to dont asks for prog path. the reason i did this is (as i said above) it only SMALL part of a bigger project (which isnt finished afterall) and the path to exe must be inputed. 2. will do. tomorrow ;) 3. will cut the unneeded.

basicly all this does its to generate au3 scripts. optimised it for prog installations for my project, but after i shoved the source of this part will fix it much better - just wanted to show and see if there is any good opinions. so will optimise it more and name it otherway - again tomorrow.

@storme again: if its not highlighted as control it may be pic. sum programs are with pics instead of controls and its detects clicked pic (not much) and mouse coords (mostly used). if u typed exactly ({alt}g) it wont happen - needs to be ("{alt}g") - like using it in autoit - same syntax. im happy that my sscript made yout things easier ^_^

actually it can automate EVERYTHING u can do with KB/MOUSE (and sum more). it may not work perfect - but will fix it.

ok thats all from me for now. new version (fixed) is coming soon.

s0z f0r m3 b4d 3ngl|sh!

Is There A Life BEFORE Death?im stupidSaved warn logs: cheateraSmOke_N Note Added 17 January 2009 - 02:54 PM Added to warn level Posting a way to hack the registry and force sending someones desktop via TCP. Jos Note Added 25 November 2008 - 02:52 PM Added to warn level for being an impolite rookie.once a year i go bad ... what will happen in 2010??[u]Its GOOD to be BAD ... (Warlock's Succubus - World of Warcraft)[/u]

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...