9 posts in this topic
Afternoon, I could very well be doing this wrong so feel free to totally advise otherwise - I'm wanting to use a GUI to first display a key from within an INI file, then secondly change the INI file by using a FileSelectFolder command but then I want to see the GUI change to reflect the change I've just made.
#include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 615, 437, 192, 124) $Input1 = GUICtrlCreateInput(Iniread(@WorkingDir & "\test.ini","Path","FilePath",""), 64, 80, 121, 21) $Button1 = GUICtrlCreateButton("Change", 200, 80, 75, 25) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 $selectedFolder = FileSelectFolder("Select Log Path Directory",@WorkingDir,0) If NOT $selectedFolder = "" Then $newLogPath = IniWrite(@WorkingDir & "\test.ini","Path","FilePath",$selectedFolder) EndIf EndSwitch WEnd So 2 part question really: (1) Should I be using GUICtrlCreateInput to display my INI read from within the GUI? (2) How can I refresh the GUI to update that to read the new information I've just written to the GUI?
Is it possible , and how can I read and write txt files from Icloud (apple service) ?
Let me try to explain my application.
On my Ipad and Iphone I create txt files. On my windows computer it is possible to read and modify these files manually, by logging in on www.icloud.com.
What I want to make is an auto-it script who reads the txt file and create an new txt file on www.icloud.com, so I can acces these on my ipad and/or phone.
Good morning community!
I was working on a script which read the content of a .ini file to retrieve the file that has to open, and, based on the value of a second key stored in the .ini file, set the window on top, minimized or maximized...
I did something like this, but seems to not work properly...
Could anyone please tell me what I'm doing wrong?
#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Outfile_x64=prova.exe #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <MsgBoxConstants.au3> #include <AutoItConstants.au3> ;#include <WinAPIEx.au3> #include <Array.au3> Local $sFileConfigurazione = @ScriptDir & "\configurazione_exe.ini" If(FileExists($sFileConfigurazione)) Then Local $aSezioneIni = IniReadSection($sFileConfigurazione, "CONFIGURAZIONE_EXE") If @error Then MsgBox($MB_ICONERROR, "Errore!", "Errore durante l'apertura del file: " & @CRLF & $sFileConfigurazione & @CRLF & "Errore: " & @error) Else ; Lancio dell'applicativo indicato nel file di configurazione Local $iPID = ShellExecute($aSezioneIni) Local $hWnd If($iPID <> 0) Then Local $aWinList = WinList() For $i = 1 To $aWinList If(WinGetProcess($aWinList[$i] = $iPID)) Then $hWnd = $aWinList[$i] EndIf Next Switch($aSezioneIni) Case $aSezioneIni = "MIN" ToolTip("MIN", 0, 0) WinSetState($hWnd, WinGetTitle($hWnd), @SW_MINIMIZE) Case $aSezioneIni = "MAX" ToolTip("MAX", 0, 0) WinSetState($hWnd, WinGetTitle($hWnd), @SW_MAXIMIZE) Case $aSezioneIni = "TOP" ToolTip("TOP", 0, 0) WinSetOnTop($hWnd, WinGetTitle($hWnd), $WINDOWS_ONTOP) EndSwitch EndIf EndIf EndIf And the .ini file is like this:
[CONFIGURAZIONE_EXE] PercorsoExe=Here goes the path and the .exe to execute ModalitaAperturaExe=Here goes one of the value below /* TOP Shows the windows on top */ /* MIN Shows the window minimized */ /* MAX Shows the window maximized */
I ran a remote program on 180 computers and logged the output to a log file with paexec. I'm trying to parse through the log file to see which computers launched the program successfully and record the computer name but I'm not sure how to go about it.
I can successfully open the log file, read it but not sure how to start separating the data.
I've attached the log file, basically every computer entry in the log file for a new computer starts with "Connecting to <computername>..." I was thinking about using that as the start and stop point for retrieving the end results. Anything with a "returned 0" is a success, everything is a fail.
Any help is much appreciated.
I am trying to create a list view wich shows the content of an ini file. There is a pulldown menu wich allows me to check a certain status in the ini file if the status is found it should read out the key and in every section the same key is located after that it should fill out the listview with all results found.
$OVERZICHTGUI = GUICreate("RMA Overzicht", 1235, 742, -1, -1) GUICtrlCreateLabel("Ingelogd als: " & $NAAMMEDEWERKER, 8, 0) GUICtrlSetState(-1, $GUI_DISABLE) GUICtrlCreateGroup("", 8, 16, 185, 89) GUICtrlCreateLabel("Status:", 32, 40, 37, 17) $STATUS = GUICtrlCreateCombo("", 32, 64, 140, 25,BitOR($CBS_DROPDOWNLIST, $WS_VSCROLL)) GUICtrlSetData($STATUS, "Aangevraagd|Verzonden|Afgehandeld", "") GUICtrlCreateGroup("", -99, -99, 1, 1) $View = GUICtrlCreateListView("RMANR|RMANRLEV|DEBITNR|KLANT|STATUS|MODEL|SERIENR|AANGEMELDDOOR|AANMELDDATUM|VERZENDDATUM|RETOURDATUM|KLACHT|OPLOSSING", 8, 120, 1218, 614) $Exit = GUICtrlCreateButton("Hoofdmenu", 1104, 8, 123, 33) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $EXIT $YesOrNo = msgBox(4,"","Terug naar het hoofdmenu?") If $YesOrNo = 6 then GUIDelete($OVERZICHTGUI) MAINMENU() ExitLoop EndIf Case $STATUS $GO = 1 $STATE = GUICtrlRead($STATUS) Local $aArray = IniReadSection(@ScriptDir & "\DB\rma.ini", "STATUS") _ArrayDisplay($aArray, "Gevonden") $FOUNDRMANR = _ArraySearch($aArray, $STATE) MsgBox(4096, "", $FOUNDRMANR) If $FOUNDRMANR = -1 Then MsgBox(4096, "Not Found", "No RMA requests with this status found.") $GO = 0 EndIf If $GO = 1 Then $VAR = IniRead(@ScriptDir & "\DB\rma.ini", "RMANR", $FOUNDRMANR, "Not found") MsgBox(4096, "", $VAR) EndIf EndSwitch WEnd