
dancer58
Members-
Posts
14 -
Joined
-
Last visited
dancer58's Achievements

Seeker (1/7)
0
Reputation
-
Thanks_____This did the job #include <file.au3> Dim $aRecords If Not _FileReadToArray("d:\downloads\CorpsofEng.csv",$aRecords) Then MsgBox(4096,"Error", " Error reading log to Array error:" & @error) Exit EndIf For $x = 1 to $aRecords[0] ;Msgbox(0,'Record:' & $x, $aRecords[$x]) $aRecords[$x] = StringReplace($aRecords[$x], "COE", "COE" & $x) Next FileDelete("c:\Program Files\AutoIt3\au3 files\CorpsofEng.csv") _FileWriteFromArray("d:\downloads\CorpsofEng.csv",$aRecords,1) Thanks for the input
-
I have text (.csv) file I need to number. It has appr. 1000 lines and over 60% have the same name. There is one thing in common and that is every line has COE in caps. COE is not in the same place in each line. I need to number each line starting with 1 and incrementing by 1 for each line. I need the numbering to be at the end of COE. COE1 COE2 ect. Does anyone have a program that I can use/modify to do this Thanks Harold
-
I think I am over my head envset appears to work but @ProgramFilesDir must look elsewhere Does anyone know what @ProgramFilesDir looks at or is there another autoit command I can use I need to change several environment setting, run a program, then set them back where they were I can do it with batch file but need to be able get environment from the computor i'm on
-
Thanks It works fine but the way I will use it I do not want to write directly to the registry I am using it on PEBuilder. The CD will be used on different machines with diferent operating systems
-
I tried EnvSet but it didnot change "@ProgramFilesDir" Am I missing something ;$rc = _RunDos('set programfiles=e:\backups') EnvSet("Programfiles", "e:\backups") MsgBox(0, "program files (should be e:\backups):", @ProgramFilesDir)
-
I'm sure this is very simple I am trying to do a dos command but it doesn't change Is %programfiles% in dos the same as @ProgramFilesDir in autoit ? $rc = _RunDos('set programfiles=e:\backups') MsgBox(0, "program files (should be e:\backups):", @ProgramFilesDir) "set programfiles=e:\backups" works in dos "changedirectorys.cmd" Thanks
-
Thanks to all that helped me. I assume everyone knows I was modifying ImageX_Wrapper. I have found this way I can learn and modify a program to suit me at the same time. I think it will be a long while before I get at all effeciant as a programmer Thanks again for the help If anyone wants the modifyed version I would be glad to post it. I do have one question. I will use this on PEBuilder but I found that I could not do a mount. It works from XP but not from PEBuilder. It really doesn't need to but I like everything to work I'm sure some of you can identify with this (: Just had another error: Fatal Error box Avector: Out of bounds This has happened on several tabs I am using version 3.2.5.2 beta never had this with old version
-
Can someone help me run $sCmd instead of: $sCmd = Run('e:\backups\imagex_gui\imagex.exe /info e:\backups\test2.wim ', '', @SW_HIDE, 2) $sCmd is the equivalent of: e:\backups\imagex_gui\imagex.exe /info e:\backups\test2.wim I've looked but am so new to programing that nothing makes sense Thanks Func DoInfo() #Region ### START Koda GUI section ### Form= $InfoGUI = GUICreate("InfoGUI", 666, 444, 300, 222) $Edit10 = GUICtrlCreateEdit("", 40, 56, 600, 300) $Gobtn = GUICtrlCreateButton("go", 200, 410, 81, 25, 0) $exitbtn = GUICtrlCreateButton("exit", 300, 410, 81, 25, 0) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### ;================================================================================ ; inserted $gInfoSource = GUICtrlRead($hInfoSourceEdit) $gInfoDescription = GUICtrlRead($hInfoDescEdit) $gInfoFlags = GUICtrlRead($hInfoFlagsEdit) $gInfoBoot = GUICtrlRead($hInfoBootCheck) $gInfoCheck = GUICtrlRead($hInfoCheckCheck) $gInfoName = GUICtrlRead($hInfoNameEdit) $gInfoNumber = GUICtrlRead($hInfoNumber) ;================================================================================ While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $exitbtn, $GUI_EVENT_CLOSE GUIDelete ($InfoGUI) exitloop Case $Gobtn Do ;================================================================================ ; inserted $sCmd = '"' & @ScriptDir & '\imagex.exe"' If $gInfoCheck = 1 Then $sCmd = $sCmd & " /check" If $gInfoBoot = 1 Then $sCmd = $sCmd & " /boot" If $gInfoFlags <> "" Then $sCmd = $sCmd & ' /flags "' & $gInfoFlags & '"' $sCmd = $sCmd & ' /Info "' & $gInfoSource & '"' SplashTextOn("command", $sCmd, 1300, 200, -1, -1, 32, "Tahoma", 16, 500) Sleep(2000) SplashOff() ;==================================================================================== Local $sCmd, $data $sCmd = Run('e:\backups\imagex_gui\imagex.exe /info e:\backups\test2.wim ', '', @SW_HIDE, 2) Do $data &= StdoutRead($sCmd) Until @error ProcessWaitClose($sCmd) GUICtrlSetData($Edit10, $data, 1) until $exitbtn EndSwitch wend Endfunc ;===DoInfo
-
Thanks MHz Appearently there cannot be nested Func's so I modified yours to: Func DoInfo() #Region ### START Koda GUI section ### Form= $InfoGUI = GUICreate("InfoGUI", 666, 444, 300, 222) $Edit10 = GUICtrlCreateEdit("", 40, 56, 600, 300) $Gobtn = GUICtrlCreateButton("go", 200, 410, 81, 25, 0) $exitbtn = GUICtrlCreateButton("exit", 300, 410, 81, 25, 0) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $exitbtn, $GUI_EVENT_CLOSE GUIDelete ($InfoGUI) Case $Gobtn Do Local $i_Pid, $data $i_Pid = Run('e:\backups\imagex_gui\imagex.exe /info e:\backups\test2.wim ', '', @SW_HIDE, 2) Do $data &= StdoutRead($i_Pid) Until @error ProcessWaitClose($i_Pid) GUICtrlSetData($Edit10, $data, 1) until $exitbtn Exitloop EndSwitch wend Endfunc ;===DoInfo This works except when I try to close $infoGUI. I can get it to close but the buttons on the Imagex main screen don't work or I can get it to close both GUI's. I have not been able to close just $infoGUI and have everything work on the main Imagex GUI. Any sugestions
-
One more problem I read somewhere there is a limit to number of lines in a window and there was a solution but I cannot find it now Thanks for the help
-
Thanks One more question How do I get the window to stay open untill I close it. The only thing keeping it open now is SplashTextOn command. I would like to be able to close the window with the exit button Thanks again
-
I am trying to move (imagex.exe /info e:\backups\test2.wim) to a GUI window but have not got it to do it. So much of the instruction is over my head (small brain) . This is what I have so far, I would appreceate any help The SplashTextOn is only for me to see if I am getting to the end #include <GUIConstants.au3> #include <Constants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Wim File Info", 666, 444, 300, 222) $Edit1 = GUICtrlCreateEdit("", 40, 56, 600, 300) $exitbtn = GUICtrlCreateButton("exit", 250, 410, 81, 25, 0) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### $nMsg = GUIGetMsg() Switch $nMsg Case $exitbtn Exit EndSwitch $i_Pid = Run('e:\backups\imagex_gui\imagex.exe /info e:\backups\test2.wim ', @WorkingDir, @SW_SHOW) $data = '' While 1 $data = StdoutRead($i_Pid) If @error = -1 Then ExitLoop GUICtrlSetData($Edit1, $data, 1) ExitLoop WEnd SplashTextOn("test3", "Imagex3 = " & $i_Pid, 400, 100, -2, -2, 32, "Tahoma", 16, 500) Sleep(3000) SplashOff()