Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/28/2013 in all areas

  1. Belini

    Games made in Autoit.

    I created this topic in order to gather all the games made in Autoit and I'm posting all I met, who know of other games can go posting here too. 3D Pong: https://mega.nz/#!ZcVD2YKS!Hc_ZtplNhN_f-8AEV9oK-iRsIYWWfML5j3o7F915JVQ Link to this topic: credits: Rux 3D Ring Game: https://mega.nz/#!YFMEgCCD!q9ujlT-2NLlivf8_JHdM828XKF-eagpHoR6nEwv3lEM Link to this topic: credits: Rux AutoiTeroids: https://mega.nz/#!YdtEhCbQ!MaoB1RwMKVupcBcIKnjLY-_A2pznGJpbHJ-yEN6B1iw Link to this topic: credits: UEZ C_Pong: https://mega.nz/#!EMV13DpD!Ox-5CDW78Tmwq2rCCfOqvgkX8J54arvdkiR_Vo9kVIg Link to this topic: credits: Appleeater Fifteen: https://mega.nz/#!dcM3TRrI!8CS5nd3qA2XCHTW57S3fF9i4263L9-4cTqMT5-Pm1TI Link to this topic: credits: AZJIO Fifteen Second Fury: https://mega.nz/#!QAkgTCQa!qdZTcGMKECxCSJLIDgdte9iN-OuwmfTVgQAaLKr2pRo Link to this topic: credits: erifash _Fifteen puzzle: https://mega.nz/#!ZckXiaqK!QguTmfKtWYoMlRVdgdfFO-G5T8TlWKytMOOcGRNrECc Link to this topic: credits: odklizec FreeWay: https://mega.nz/#!ER8RCRAC!pIzWbfwxQkI_3BLEoJVtxEjV495EfEpgIWaUhJMyrUU credits: Xan4545 IconGame: https://mega.nz/#!RIdyUaKT!w1RF3yVnpM27fLM3a1v3hilVQlP2frEPXpwDv_sacNs Link to this topic: http://forum.autoitbrasil.com/index.php?/topic/313-icongame-game-de-icones/page__view__findpost__p__1484 credits: Jscript IX v1.04: https://mega.nz/#!1Nc3AaDI!u4sNZta3W04lIJpN0MF10yYsqZ2OKNnj-TJv6fR4aB4 Link to this topic: credits: Topher Jogo da Velha: https://mega.nz/#!sRdCgQAT!BXmcRfFwW468zo5B3cjYChu1jkk8TIkR3ZJ2K4nPkNk Link to this topic: http://forum.autoitbrasil.com/index.php?/topic/107-jogo-de-velha-babyloves/page__view__findpost__p__512__hl__velha__fromsearch__1 credits: Babyloves Jogo da Velha 2: https://mega.nz/#!kJM2yAoA!LthR9GvvKsYYQU4QqbwxMaKxj9gxXXSvrh_4CSLXzTk Link to this topic: http://forum.autoitbrasil.com/index.php?/topic/682-jogos-feitos-em-autoit/#entry8097 credits: alexandre Maze Generator: https://mega.nz/#!cV9kwILB!ySzgw3ZAYJwhhGvC3E5P_gGg3U5jM8oCgLYZvVnUsGI Link to this topic: credits: playjacob Ping Pong 3D: https://mega.nz/#!pE0xFLAD!7Lm7FEfBs3sW9HkbXxADTqbvjvco74vzOd5J4XaCHKg Link to this topic: credits: Info Plastic Sliding Puzzle: https://mega.nz/#!IIMSQJDa!jtiesw43pT5RQZumUjRpImUxKbG_I1pOIkVxnigBRu8 Link to this topic: credits: Topher Pong AI's: https://mega.nz/#!BYs1WRSS!0_MxxMkCygKwXFuIKWnzDaQisbq3fqDYw1GFyFKXo50 Link to this topic: credits: AlmarM Pong 1: https://mega.nz/#!ZEdzQTzA!-urdW4TpJgOBEM5PeZPnftAgzu5IX4qvSt3CsV0BTd4 Link to this topic: credits: zcoacoaz Pong 2: https://mega.nz/#!kEchiSpR!eGxxaPhxaQ4cVpk1aX6saKPFQILaHujdPrppd-l18kM Link to this topic: credits: LimeSeed Pong Clone: https://mega.nz/#!gQkVWQqB!Q8Uru9aW76Y554H2paT1HK1PeXlodr20HX_3treugGs Link to this topic: credits: BananaFredSoft Pong Santa: https://mega.nz/#!5Al11QTL!Vudjn-vHIT5CW0MY5K6esEjSA-gmHGOUc8SlJnrjtPc Link to this topic: credits: peter1234 Puzzle-Game: https://mega.nz/#!dRU2iSqQ!vQbKJDEUoWzJrSi4jX4fmAkABJCxYMGTxIbOjJZyDK4 Link to this topic: credits: onedayillpay Real Snake: https://mega.nz/#!kUcR1JaD!EUwVhO6_60ysUFQbTB9lxuw70LPUqR98gOJYRBnaJ5s Link to this topic: credits: Markus Reflex: https://mega.nz/#!YZckwApB!_xDDmbIszGtng41H_XGJ_8qO7X20RKqDl-Oi41EqGU0 Manual: http://dl.dropbox.com/u/71596185/Reflex.rtf Sounds and images: http://dl.dropbox.com/u/71596185/Reflex104.zip Link to this topic: credits: Topher Space Invaders: https://mega.nz/#!0QchiLSC!3U6RFLER_2uOKtbg2v1sM8ApkaSP-h0ZIVZicW_I3tw Link to this topic:?do=embed' frameborder='0' data-embedContent> credits: Eigensheep Super Mario Game gdi+: https://mega.nz/#!ABMwkTLR!RNrCSGPfjXpAGl_EsaiqAv0RoH32RjJa-3IZArdGMrI Link to this topic: '?do=embed' frameborder='0' data-embedContent>> credits: eukalyptus UNKNOWN AUTHORS: Pong_05: https://mega.nz/#!NBdjkLYD!uSHHoWFFFxk4D2zg701nh3WH6nCE8xc9TfFL07MCOa8 Link to this topic: Unknown credits: Author unknown IMAGES: 3D Pong: 3D Ring Game: AutoiTeroids: C_pong: Fifteen: Fifteen Second Fury: Icon Game: IX v1.04: Jogo da velha: Jogo da Velha 2:
    1 point
  2. Or... #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <String.au3> $Form1 = GUICreate("Form1", 615, 438, 574, 290) $Text = GUICtrlCreateEdit("", 8, 40, 601, 353) $Convert = GUICtrlCreateButton("Convert", 8, 400, 297, 33) $Close = GUICtrlCreateButton("Close", 312, 400, 297, 33) $StringReverse = GUICtrlCreateRadio("String Reverse", 16, 8, 89, 17) $StringEncrypt = GUICtrlCreateRadio("String Encrypt", 128, 8, 89, 17) $Frame1 = GUICtrlCreateGroup("", 8, 0, 105, 33) GUICtrlCreateGroup("", -99, -99, 1, 1) $Password = GUICtrlCreateInput("", 216, 8, 385, 21) $Frame2 = GUICtrlCreateGroup("", 120, 0, 489, 33) GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Close Exit Case $Convert If GUICtrlRead($StringReverse) = 1 Then $ReadText = GUICtrlRead($Text) GUICtrlSetData($Text, "") $aText = StringSplit($ReadText, @CRLF, 1) $sText = "" For $i = 1 To $aText[0] $sText &= _StringReverse($aText[$i]) & @CRLF Next GUICtrlSetData($Text, StringTrimRight($sText, 2)) ElseIf GUICtrlRead($StringEncrypt) = 1 Then $ReadText = GUICtrlRead($Text) $ReadPassword = GUICtrlRead($Password) If $ReadPassword = Not 0 Then $TextEncrypt = _StringEncrypt(1, $ReadText, $ReadPassword) GUICtrlSetData($Text, $TextEncrypt) Else MsgBox(0, "Error", "String encryption requires a password") EndIf Else MsgBox(0, "Error", "No manipulation method specified") EndIf EndSwitch WEnd Br, FireFox.
    1 point
  3. FireFox

    IP Camera stream + record

    Alright. I will find the issue don't worry <snip>
    1 point
  4. I think this is much better solution (if you still wanna use it WITHOUT WinApi.au3), also CTRL+A works for combo by default: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GuiEdit.au3> $Form1 = GUICreate("Form1", 600, 400) $Edit1 = GUICtrlCreateEdit("Some text in Edit1" & @CRLF & "focus me, and press CTRL+A", 0, 0, 300, 350) $Edit2 = GUICtrlCreateEdit("Some text in Edit2" & @CRLF & "focus me, and press CTRL+A", 300, 0, 300, 350) $Combo1 = GUICtrlCreateCombo('', 0, 360, 600);CTRL+A already works for combo, by default. GUICtrlSetData(-1, 'Some Data 1|Some Data 2|Some Data 3|Some Data 4|Some Data 5|Some Data 6', 'Some Data 1') GUISetState(@SW_SHOW) Global $hSelAll = GUICtrlCreateDummy() Dim $AccelKeys[1][2] = [["^a", $hSelAll]] GUISetAccelerators($AccelKeys, $Form1) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $hSelAll _SelectAllTextInEdit() EndSwitch WEnd Func _SelectAllTextInEdit();will make select all text in eny focused edit, as long as it is edit inside $Form1 winhandle because we bound GUISetAccelerators to $Form1 Local $theHandle = DllCall("user32.dll", "hwnd", "GetFocus") If NOT @error Then $TheClass = DllCall("user32.dll", "int", "GetClassNameW", "hwnd", $theHandle[0], "wstr", "", "int", 4096) If NOT @error Then If $TheClass[2] = 'Edit' Then _GUICtrlEdit_SetSel($theHandle[0], 0, -1) EndIf EndIf EndFunc
    1 point
  5. Use ControlSend or ControlClick if you can get the information for the checkboxes you need. Or see if there's a way to do a silent install with the options you want. BTW, I find it humorous that you blacked out the name of the program in the screen shots but left it in your script.
    1 point
  6. Here's an example: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GuiEdit.au3> #include <WinAPI.au3> $Form1 = GUICreate("Form1", 600, 400) $Edit1 = GUICtrlCreateEdit("Some text in Edit1" & @CRLF & "focus me, and press CTRL+A", 0, 0, 300, 400) $Edit2 = GUICtrlCreateEdit("Some text in Edit2" & @CRLF & "focus me, and press CTRL+A", 300, 0, 300, 400) GUISetState(@SW_SHOW) Global $hSelAll = GUICtrlCreateDummy() Dim $AccelKeys[1][2] = [["^a", $hSelAll]] GUISetAccelerators($AccelKeys, $Form1) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $hSelAll _SelectAllTextInEdit() EndSwitch WEnd Func _SelectAllTextInEdit();will make select all text in eny focused edit, as long as it is edit inside $Form1 winhandle because we bound GUISetAccelerators to $Form1 Local $theHandle = _WinAPI_GetFocus() Local $TheClass = _WinAPI_GetClassName($theHandle) If $TheClass = 'Edit' Then _GUICtrlEdit_SetSel($theHandle, 0, -1) EndFunc
    1 point
  7. Here, let me then: #include <WinApi.au3> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; AddHookApi("user32.dll", "MessageBoxW", "Intercept_MessageBoxW", "int", "hwnd;wstr;wstr;uint") Func Intercept_MessageBoxW($hWnd, $sText, $sTitle, $iType) Local $aCall = DllCall("user32.dll", "int", "MessageBoxW", _ "hwnd", $hWnd, _ "wstr", $sText, _ "wstr", StringReplace($sTitle, "AutoIt", @ScriptName), _ "uint", $iType) If @error Or Not $aCall[0] Then Return 0 Return $aCall[0] EndFunc ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Let's try it ; Usual message box MsgBox(0, 'Test', 'Some text') ; Cause error that would say some AutoIt shit happened, but now it wouldn't say "AutoIt" DllStructCreate("byte[123456789097]") ; The End ; The magic is down below Func AddHookApi($sModuleName, $vFunctionName, $vNewFunction, $sRet = "", $sParams = "") Local Static $pImportDirectory, $hInstance Local Const $IMAGE_DIRECTORY_ENTRY_IMPORT = 1 If Not $pImportDirectory Then $hInstance = _WinAPI_GetModuleHandle(0) $pImportDirectory = ImageDirectoryEntryToData($hInstance, $IMAGE_DIRECTORY_ENTRY_IMPORT) If @error Then Return SetError(1, 0, 0) EndIf Local $iIsInt = IsInt($vFunctionName) Local $iRestore = Not IsString($vNewFunction) Local $tIMAGE_IMPORT_MODULE_DIRECTORY Local $pDirectoryOffset = $pImportDirectory Local $tModuleName Local $iInitialOffset, $iInitialOffset2 Local $iOffset2 Local $tBufferOffset2, $iBufferOffset2 Local $tBuffer, $tFunctionOffset, $pOld, $fMatch, $pModuleName, $pFuncName Local Const $PAGE_READWRITE = 0x04 While 1 $tIMAGE_IMPORT_MODULE_DIRECTORY = DllStructCreate("dword RVAOriginalFirstThunk;" & _ "dword TimeDateStamp;" & _ "dword ForwarderChain;" & _ "dword RVAModuleName;" & _ "dword RVAFirstThunk", _ $pDirectoryOffset) If Not DllStructGetData($tIMAGE_IMPORT_MODULE_DIRECTORY, "RVAFirstThunk") Then ExitLoop $pModuleName = $hInstance + DllStructGetData($tIMAGE_IMPORT_MODULE_DIRECTORY, "RVAModuleName") $tModuleName = DllStructCreate("char Name[" & _WinAPI_StringLenA($pModuleName) & "]", $pModuleName) If DllStructGetData($tModuleName, "Name") = $sModuleName Then ; function from this module $iInitialOffset = $hInstance + DllStructGetData($tIMAGE_IMPORT_MODULE_DIRECTORY, "RVAFirstThunk") $iInitialOffset2 = $hInstance + DllStructGetData($tIMAGE_IMPORT_MODULE_DIRECTORY, "RVAOriginalFirstThunk") If $iInitialOffset2 = $hInstance Then $iInitialOffset2 = $iInitialOffset $iOffset2 = 0 While 1 $tBufferOffset2 = DllStructCreate("dword_ptr", $iInitialOffset2 + $iOffset2) $iBufferOffset2 = DllStructGetData($tBufferOffset2, 1) If Not $iBufferOffset2 Then ExitLoop If $iIsInt Then If BitAND($iBufferOffset2, 0xFFFFFF) = $vFunctionName Then $fMatch = True; wanted function Else $pFuncName = $hInstance + $iBufferOffset2 + 2 ; 2 is size od "word", see line below... $tBuffer = DllStructCreate("word Ordinal; char Name[" & _WinAPI_StringLenA($pFuncName) & "]", $hInstance + $iBufferOffset2) If DllStructGetData($tBuffer, "Name") == $vFunctionName Then $fMatch = True; wanted function EndIf If $fMatch Then $tFunctionOffset = DllStructCreate("ptr", $iInitialOffset + $iOffset2) VirtualProtect(DllStructGetPtr($tFunctionOffset), DllStructGetSize($tFunctionOffset), $PAGE_READWRITE) If @error Then Return SetError(3, 0, 0) $pOld = DllStructGetData($tFunctionOffset, 1) If $iRestore Then DllStructSetData($tFunctionOffset, 1, $vNewFunction) Else DllStructSetData($tFunctionOffset, 1, DllCallbackGetPtr(DllCallbackRegister($vNewFunction, $sRet, $sParams))) EndIf Return $pOld EndIf $iOffset2 += DllStructGetSize($tBufferOffset2) WEnd ExitLoop EndIf $pDirectoryOffset += 20 ; size of $tIMAGE_IMPORT_MODULE_DIRECTORY WEnd Return SetError(4, 0, 0) EndFunc Func VirtualProtect($pAddress, $iSize, $iProtection) Local $aCall = DllCall("kernel32.dll", "bool", "VirtualProtect", "ptr", $pAddress, "dword_ptr", $iSize, "dword", $iProtection, "dword*", 0) If @error Or Not $aCall[0] Then Return SetError(1, 0, 0) Return 1 EndFunc Func ImageDirectoryEntryToData($hInstance, $iDirectoryEntry) ; Get pointer to data Local $pPointer = $hInstance ; Start processing passed binary data. 'Reading' PE format follows. Local $tIMAGE_DOS_HEADER = DllStructCreate("char Magic[2];" & _ "word BytesOnLastPage;" & _ "word Pages;" & _ "word Relocations;" & _ "word SizeofHeader;" & _ "word MinimumExtra;" & _ "word MaximumExtra;" & _ "word SS;" & _ "word SP;" & _ "word Checksum;" & _ "word IP;" & _ "word CS;" & _ "word Relocation;" & _ "word Overlay;" & _ "char Reserved[8];" & _ "word OEMIdentifier;" & _ "word OEMInformation;" & _ "char Reserved2[20];" & _ "dword AddressOfNewExeHeader", _ $pPointer) Local $sMagic = DllStructGetData($tIMAGE_DOS_HEADER, "Magic") ; Check if it's valid format If Not ($sMagic == "MZ") Then Return SetError(1, 0, 0) ; MS-DOS header missing. Btw 'MZ' are the initials of Mark Zbikowski in case you didn't know. ; Move pointer $pPointer += DllStructGetData($tIMAGE_DOS_HEADER, "AddressOfNewExeHeader") ; move to PE file header ; In place of IMAGE_NT_SIGNATURE structure Local $tIMAGE_NT_SIGNATURE = DllStructCreate("dword Signature", $pPointer) ; Check signature If DllStructGetData($tIMAGE_NT_SIGNATURE, "Signature") <> 17744 Then ; IMAGE_NT_SIGNATURE Return SetError(2, 0, 0) ; wrong signature. For PE image should be "PE\0\0" or 17744 dword. EndIf ; Move pointer $pPointer += 4 ; size of $tIMAGE_NT_SIGNATURE structure ; In place of IMAGE_FILE_HEADER structure ; Move pointer $pPointer += 20 ; size of $tIMAGE_FILE_HEADER structure ; Determine the type Local $tMagic = DllStructCreate("word Magic;", $pPointer) Local $iMagic = DllStructGetData($tMagic, 1) Local $tIMAGE_OPTIONAL_HEADER If $iMagic = 267 Then ; x86 version ; Move pointer $pPointer += 96 ; size of $tIMAGE_OPTIONAL_HEADER ElseIf $iMagic = 523 Then ; x64 version ; Move pointer $pPointer += 112 ; size of $tIMAGE_OPTIONAL_HEADER Else Return SetError(3, 0, 0) ; unsupported module type EndIf ; Validate input by checking available number of structures that are in the module Local Const $IMAGE_NUMBEROF_DIRECTORY_ENTRIES = 16 ; predefined value that PE modules always use (AutoIt certainly) If $iDirectoryEntry > $IMAGE_NUMBEROF_DIRECTORY_ENTRIES - 1 Then Return SetError(4, 0, 0) ; invalid input ; Calculate the offset to wanted entry (every entry is 8 bytes) $pPointer += 8 * $iDirectoryEntry ; At place of correst directory entry Local $tIMAGE_DIRECTORY_ENTRY = DllStructCreate("dword VirtualAddress; dword Size", $pPointer) ; Collect data Local $pAddress = DllStructGetData($tIMAGE_DIRECTORY_ENTRY, "VirtualAddress") If $pAddress = 0 Then Return SetError(5, 0, 0) ; invalid input ; $pAddress is RVA, add it to base address Return $hInstance + $pAddress EndFuncedit: because this is better than before.
    1 point
  8. Your problem is solved? If not, try the TCP examples of the beta helpfile. Replace the server script IP by @IPAddress1 and the client script IP by the global IP of the server. Br, FireFox.
    1 point
  9. You cannot listen to the global IP as it belongs to your local router. You also need to create a port forwarding on that device in order to make this working. Or a third party server in the middle where both PCs can connect to to receive the commands.
    1 point
  10. To only work with the visible cells of a filtered range you either need to check the "hidden" attribute of the cell or row or intersect the filtered and unfiltered range and only process the resulting range.
    1 point
  11. JCEF

    Action on key press

    gugs, welcome! I hope this helps: #cs 1 - I tried to see in the task manager, which process the application "E-Prime" loads when it starts. 2 - How the tasks are repetitive, the script always kept active until the end of the day. Assuming that the process is "notepad.exe": #ce #NoTrayIcon #include <Misc.au3> AdlibRegister("StartAPP", 15000) ; With intervals of 15 seconds, calls the function checks whether the application is run (prevents cases in which it is closed incorrectly). ;ShellExecute(@DesktopDir & "\Task\Steve Task 2.ebs2") ; Uncomment ShellExecute("notepad.exe") ; Simulates your application (@DesktopDir & "\Task\Steve Task 2.ebs2") Local $hDLL = DllOpen("user32.dll") While 1 If _IsPressed("53", $hDLL) Then Restart() EndIf If _IsPressed("58", $hDLL) Then Terminate() EndIf Sleep(100) WEnd Func Restart() ProcessWaitClose("notepad.exe") ; Simulates your process Sleep(5000) ; Number of milliseconds to wait If Not ProcessExists("notepad.exe") Then ;ShellExecute(@DesktopDir & "\Task\Steve Task 2.ebs2") ; Uncomment ShellExecute("notepad.exe") ; Simulates your application (@DesktopDir & "\Task\Steve Task 2.ebs2") ProcessWait("notepad.exe") ; Simulates your process EndIf EndFunc ;==>Restart Func Terminate() DllClose($hDLL) AdlibUnRegister("StartAPP") Exit EndFunc ;==>Terminate Func StartAPP() If Not ProcessExists("notepad.exe") Then ;ShellExecute(@DesktopDir & "\Task\Steve Task 2.ebs2") ; Uncomment ShellExecute("notepad.exe") ; Simulates your application (@DesktopDir & "\Task\Steve Task 2.ebs2") EndIf EndFunc ;==>StartAPP
    1 point
  12. #include 'Array.au3' Opt('MustDeclareVars', 1) Local $sIniFile = @ScriptDir & '\Setup.ini' If Not FileExists($sIniFile) Then MsgBox(0, 'Error', 'IniFile Not Found') Exit EndIf Local $sCombo, $sFile, $InstallEntries = '' Local $aSection, $aSections = IniReadSectionNames($sIniFile) Local $GUI = GUICreate('Setup Menu', 175, 40) Local $InstallComboBox = GUICtrlCreateCombo('', 10, 10, 100, 20) Local $InstallButton = GUICtrlCreateButton('Install', 117, 10, 50, 20) For $i = 1 To $aSections[0]; <-- section names, same as display names $InstallEntries &= '|' & $aSections[$i] Next GUICtrlSetData($InstallComboBox, $InstallEntries) GUISetState(@SW_SHOW) While 1 Switch GUIGetMsg() Case -3 GUIDelete($GUI) ExitLoop Case $InstallButton $sCombo = GUICtrlRead($InstallComboBox) For $i = 1 To $aSections[0] If $aSections[$i] = $sCombo Then $aSection = IniReadSection($sIniFile, $aSections[$i]) If $aSection[0][0] = 2 Then; <-- check if good array. ; $aSection[1][1] = Folder ; $aSection[2][1] = Launcher $sFile = @ScriptDir & '\' & $aSection[1][1] & '\' & $aSection[2][1] If FileExists($sFile) Then ShellExecute($sFile) Else MsgBox(0, 'File Not Found', $sFile) EndIf EndIf EndIf Next EndSwitch WEnd [Adobe Reader] Folder=Reader Launcher=AcroRead.msi [Flash Player] Folder=Flash Launcher=install_flash_player_11_plugin.msi [Mozilla Firefox] Folder=Firefox Launcher=Firefox-16.0.2-en-US.msi [Nero Express] Folder=Nero Launcher=setup.exe Nice refresher. Been awhile since I played with INI functions. -edit- sp*
    1 point
  13. I modified your script to be easier for me. See if this is what you want: #include <WindowsConstants.au3> #include <GuiComboBox.au3> #include <Array.au3> Local $IniFile = @ScriptDir & "\Setup.ini" Local $InstallEntries = "" Local $secNames = IniReadSectionNames($IniFile) Local $Gui = GUICreate("Setup Menu", 280, 100) Local $InstallButton = GUICtrlCreateButton("Install", 210, 10, 50, 25) Local $InstallEvol = GUICtrlCreateLabel("", 20, 50, 240, 20) Local $InstallComboBox = GUICtrlCreateCombo("", 20, 10, 170, 25) ;Local $InstallComboBox = GUICtrlCreateCombo("", 10, 10, 100, 20, $CBS_DROPDOWN + $CBS_AUTOHSCROLL + $WS_VSCROLL + $CBS_SORT); Sort For $i = 1 To UBound($secNames) - 1 If $InstallEntries = "" Then $InstallEntries &= $secNames[$i] Else $InstallEntries &= "|" & $secNames[$i] EndIf Next GUICtrlSetData($InstallComboBox, $InstallEntries) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case $msg = $InstallButton Install() Case $msg = $InstallComboBox GUICtrlSetData($InstallEvol, "") Case $msg = -3 ExitLoop EndSelect WEnd Func Install() Local $sec = GUICtrlRead($InstallComboBox) If $sec <> "" Then Local $aSec = IniReadSection($IniFile, $sec) ;_ArrayDisplay($aSec) Local $DisplayName = $aSec[1][1] Local $FolderName = $aSec[2][1] Local $LauncherName = $aSec[3][1] GUICtrlSetData($InstallEvol, "Installing: " & $DisplayName) ;ShellExecuteWait($FolderName & "\" & $LauncherName) MsgBox(0, "", $DisplayName & " # " & $FolderName & " # " & $LauncherName) GUICtrlSetData($InstallEvol, "Installing " & $DisplayName & " is complete!") Else MsgBox(16, "Error", "You have to choose an application to install!") EndIf EndFunc ;==>Install
    1 point
  14. Melba23

    Action on key press

    gugs, It looks as if there is not a lot for AutoIt to recognise in that! I think we might have to go a different way and try to recognise the screen itself. I am not familiar with this e-prime software (other than Googling it earlier) but you say that you have created a screen to ask the user what to do next. Can you alter the colour of a section of this screen so that it can be differentiated from all the others? Such as changing the background colour or the text box? If so, then we could possibly use a Pixel* function to recognise when that particular screen appears. And one point looking at the code you posted above - your HotKeySet syntax is wrong. You need to use the actual key value not the key code, so they should read: HotKeySet("s", "Restart") HotKeySet("x", "Terminate") M23
    1 point
  15. incepator, Before I even look in detail at that code, I would like some explanation of the end state for this script. I see that we now have 3 columns - not 2 - in the original listview and that we now create another listview in a child GUI. I am not wasting my time coding possible solutions when I have no idea of what you are actually trying to do, as when people change the goalposts mid-thread the decisions taken to solve the initial problem are often not those which lend themselves to the final overall solution. So over to you to explain exactly what you are doing here and what problems you are encountering. M23
    1 point
  16. If you want the simplest of ways, then check out IniWrite and the other ini commands. Some will tell you that INI files are redundant, but I've seen very little evidence of that ... and they've been saying that for years. They have their benefits ... especially manual edits with Notepad, size and portability.
    1 point
×
×
  • Create New...