5 posts in this topic
By Kevin Finnegan
Long time lurker and now forum poster! I'm writing a relatively simple backup script for my firm that automates the copy, compression and organization of Leaver's data on one of our secured NAS systems. I personally found the best method to do this so far was to use 7zG.exe (GUI version of 7Zip which can use command-line too) and it functions quite well!
I would like to retrieve more info on whether any warnings or errors happen in 7Zip during the backup, but I can't quite get my head around the syntax and switches for reading out, it seems any adjustment I make to the RunWait call's string seems to break the backup or give unexpected repercussions! Hopefully its something silly I'm doing as I don't code very often.
Here is the working version:
; Compress the directories one by one in the zip using the listfile.... Local $iPID = RunWait(@ScriptDir & "\bin\7zG.exe a -mx" & $compressionQuality & " -v" & $compressSplitFileSize & " -wc:\temp " _ & $backupToLocation & "\" & $userDirectory & ".7z @bin\listfile.txt -x@bin\excludefile.txt", "", @SW_SHOWDEFAULT, $STDOUT_CHILD) Ultimately I would love to switch entirely to 7za.exe (standalone) so that I can read the progress percentage, current file being uploaded and any warnings or errors could be processed and output to the AutoIT script's GUI I've created rather than jumping in and out of two applications per se.
I try to activate my opened excel file using this code :
#include <Excel.au3> $oExcel = _Excel_Open() $sCaption = $oExcel.Caption WinSetState($sCaption, "", @SW_MAXIMIZE) But when i edit cell in my excel file above code not working because it open new excel sheet.
following my previous question, I have moved all potentially instable object interactions into Executes. But it Looks like "="-assignments to object Attributes cannot be done with Execute, only method calls. Using an "$obj = 1" construct, it compares (Eval) instead of sets (Execute) the value.
I have tested multiple different combinations, using Execute and Assign, but it seems not to work with object Attributes. :-(
Gives following Output:
The assign Action using apply (a3) Fails, while assigning it directly, without Assign() works fine.
The execute versions compare and do not assign, in both cases. Though, the "Execute" topic in the help file says it executes, not evaluates.
I have found a similar, old thread, which explains this behavious but does not give a solution. https://www.autoitscript.com/forum/topic/110228-pass-object-property-as-a-variable/
Is there a way to assign to a com object's Attribute? Or is there anything new to this unexpected behaviour of Execute (at least compared to the help file description and Python's exec).
Any help is appreciated, and thank you for all the help so far.
Hi I have jus started using auto-it . Please correct me if I'm wrong.
I need to read data from an input in text box and search in excel file and return value in next column of matched cell on GUI.
I have written below code but i cannot use variable which has data stored. it works only when search string is hard coded.
Please help out.
Local $GuiMain = GUICreate("EXCEL TEST", 399, 180) ;creates main GUI
;~ Local $idOK = GUISetOnEvent($GUI_EVENT_CLOSE, "Close")
Local $iWidthCell = 70
Local $idLabel = GUICtrlCreateLabel("PART NUMBER", 10, 30, $iWidthCell,50)
Local $RUN_1 = GUICtrlCreateButton("OK", 70, 70, 85, 25)
Local $Input_1 = GUICtrlCreateInput("PART NUMBER", 100, 20, 120, 20)
Local $sMenutext = GUICtrlRead($Input_1, 1)
$MSG = GUIGetMsg()
Case $MSG = $GUI_EVENT_CLOSE
Case $MSG = $RUN_1
Local $oAppl = _Excel_Open()
Local $sFilePath1 = "D:\Anu_WorkFolder\Components.xlsx"
Local $oWorkbook = _Excel_BookOpen($oAppl, $sFilePath1, Default, Default, True)
Local $aResult = _Excel_RangeFind($oWorkbook, $sMenutext , Default, Default, $xlWhole)
How to Activate Opened Excel Windows Using Class not Tittle, Because Some time opened defferent excel that have different name.
I Tried with
Winactivate ("[CLASS:XLMAIN]") but not working