
sutefan
Members-
Posts
16 -
Joined
-
Last visited
Profile Information
-
Location
Bristol, England
-
WWW
http://autoit.echo8.net/
-
Interests
Film, Football (soccer), Online Gaming_____<br />_____Work: Netware, GroupWise, ZENWorks
sutefan's Achievements

Seeker (1/7)
0
Reputation
-
Find text from file.txt and display in MsgBox
sutefan replied to sutefan's topic in AutoIt General Help and Support
D1234 is a computer name and your correct about the .london. Yes, all are alpha and 3-4 numerics. E.g. D1234, D456, N7890, N354 Sutefan -
Find text from file.txt and display in MsgBox
sutefan replied to sutefan's topic in AutoIt General Help and Support
Thanks at least I know I won't be wasting valuable time and limited brain cells on the wrong path! Sutefan -
I trying to layout what I need to lookup, study, learn so that I can create an app that will open a file, search a specific string of text, extract part of that spring and display it in a MsgBox. E.g. [Example Log: C:\Program Files\Novell\ZENWorks\ZWSREG] Friday, March 18, 2005 14:04:35 -- Login event -- Entering NDSTree::WhoAmI() Friday, March 18, 2005 14:04:35 -- Login event -- WhoAmI() returning D1234.Workstations.ZEN.london.vca. Friday, March 18, 2005 14:04:35 -- Login event -- Leaving NDSTree::WhoAmI() Friday, March 18, 2005 14:04:35 -- Login event -- Adding the following to the request buffer for zenwmLoggedInWorkstation: Friday, March 18, 2005 14:04:35 -- Login event -- D1234.Workstations.ZEN.london.vca Friday, March 18, 2005 14:04:35 -- Login event -- Leaving WMHelperSystemEntryEx From this example log I'm looking to extract the D1234 and display that in a MsgBox. The line could be located anywhere in the file and also the length of the D1234 and .London strings can vary. Am I on the right track? What I am missing? What should I be looking? Should I change my approach to this? On a similar note but for personal use I play a game called EverQuestII and it has a log file that I liked to do some searching on particulary for lines and port that to a file (XML?) so that I can view statistics on my performance. [Example Log: C:\Program Files\Sony\Everquest2\Logs\Runneye\eq2_burt.log] (1110268040)[Tue Mar 08 07:47:20 2005] You mined a rough malachite from the rustic stone. The rustic stone looks slightly lessened. (1110268049)[Tue Mar 08 07:47:29 2005] You mined a lead cluster from the rustic stone. The rustic stone looks slightly lessened. (1110268056)[Tue Mar 08 07:47:36 2005] You mined a rough malachite from the rustic stone. The rustic stone looks slightly lessened. (1110268071)[Tue Mar 08 07:47:51 2005] You gathered a Snakeroot from the ravaged natural herb garden. The ravaged natural herb garden looks slightly lessened. (1110268078)[Tue Mar 08 07:47:58 2005] You gathered a Juniper from the ravaged natural herb garden. The ravaged natural herb garden looks slightly lessened. (1110268084)[Tue Mar 08 07:48:04 2005] You gathered a Milkweed from the ravaged natural herb garden. The ravaged natural herb garden looks slightly lessened. (1110268100)[Tue Mar 08 07:48:20 2005] You gathered a Juniper from the ravaged natural herb garden. The ravaged natural herb garden looks slightly lessened. (1110268106)[Tue Mar 08 07:48:26 2005] You gathered a Sassafras from the ravaged natural herb garden. The ravaged natural herb garden looks slightly lessened. I'd like the data collated and extracted to XML for future use in a webpage, I'd looking at collating: Number of times mined, gathered etc Number of times mined, gathered specific object (rough malachite, lead cluster, snakeroot and hundred others) Other stats to be added at later date. I've been looking through these forums and help and so far these are things I think I should be looking at: FileOpen FileReadLine String StringInStr StringSplit Not sure about what I else I need to look tbh as without the knowledge it's hard to know what to look for Sutefan (30 minutes till the weekend!!!)
-
Hey, Is there a way to tell a script to wait till a particular file and directory exists before deleting it? The following works to a degree: ;;Delete Icon from User's Desktop and Start Menu WinWaitClose("InstallShield Wizard", "", 20) FileDelete($UPD) DirRemove($UPSM,1) MsgBox(0, "Finished", "Please restart the computer to complete the installation") The directory and icons in question are created as part of a installation program that this script runs earlier. There are times though due to computer speed, network activity where there can be a delay before the icons appear (longer than 20 seconds) and in these cases the script does not wait. Is there a better command than WinWaitClose to use in this scenario? Sutefan
-
Scripting Auto Install of Java RE
sutefan replied to sutefan's topic in AutoIt General Help and Support
Thanks PacMac I can now see what I did wrong! -
Scripting Auto Install of Java RE
sutefan replied to sutefan's topic in AutoIt General Help and Support
I did. [Edit] ControlSend ( "title", "text", controlID, "string" [, flag] ) title=InstallShield Wizard text=&Yes controlID=n/a string=n flag=n/a Now unless my help is missing something....I can't see what is wrong. Is there a more useful help guide around ? -
Scripting Auto Install of Java RE
sutefan replied to sutefan's topic in AutoIt General Help and Support
What's the correct way to complete a ControlSend? AutoIt Window Info shows: >>>>>>>>>>>> Window Details <<<<<<<<<<<<< Title: InstallShield Wizard Class: #32770 Size: X: 143 Y: 209 W: 504 H: 379 >>>>>>>>>>> Control Under Mouse <<<<<<<<<<< Size: X: 323 Y: 319 W: 75 H: 23 Control ID: 6 ClassNameNN: Button1 Text: &Yes >>>>>>>>>>> Visible Window Text <<<<<<<<<<< &Yes &No I coded this as : ;License Agreement Screen - press y for Yes WinWaitActive ("InstallShield Wizard", "&Yes", "") ControlSend("InstallShield Wizard", "&Yes", "", "y") What am I doing wrong? Edit: hehe no longer a newbie -
I need to rollout JRE. AppsDeploy suggest the following switch /S /V/qb!, this for whatever reason does not work with version 1.4.1.03. So AutoIt steps in to the rescue, the install process is only two steps: Press y on License screen. Press n on Setup type screen. ; Java Runtime Environment ; Version: 1.4.1.03 ; ;Execute the Setup File RunWait ( "\\server1\vol1\software\java\j2re-1_4_1_03-windows-i586-i.exe" , "C:\Windows", @SW_SHOW) ;License Agreement Screen - press n for Yes WinWaitActive ("InstallShield Wizard", "&Yes","") Send("y") ;Setup Type Screen - Press n for Next WinWaitActive ("InstallShield Wizard", "&Next","") Send("n") #Region --- CodeWizard generated code Start --- ;MsgBox features: Title=Yes, Text=Yes, Buttons=OK, Icon=Question ;MsgBox(32,"Finished - Java 1.4.1.03","" & @CRLF & "Please restart your computer to complete the installation.") #EndRegion --- CodeWizard generated code End --- Problems with my script is that the .exe launches fine but nothing happens. However, if I delete (; not work) everything from ;Setup Type Screen and below the script will actual perform the first step (press y). Is there some switch or command that should come after Send("y")? I have tried the y in upper and lower case. Sutefan
-
Cool, thanks.
-
Struggling now... I can get the Volume Control window to open, next I want the select Options then properties. I've been messing around with values etc for ControlSend but have yet to get it work. No errors just nothing seems to happen. Option is a menu name, when I use Active Window to look info on and move the cursor over Options it comes up with nothing for Text: or Control ID:. Am I doing something wrong? Sute...
-
Thanks! I've already done one script for updating anti-virus with the help of somebody else on these forums...I've not got far with this but so far manage to code the following: RunWait("SNDVOL32.EXE", "C:\Windows", @SW_MAXIMIZE) ; change @SW_MAXIMIZE to HIDE ControlSend("Volume Control", "Volume Control", "1004", ""); 1004=ControlID for Options I've not got the second line correct yet.. Sutefan
-
Thanks for the reply MadSc13ntist, A lot of things for me to lookup there and the fact you listed them will make it easier for me find the correct ones! Sutefan
-
Not sure if AutoIt's the program for this but I want to create something that will let me do the following: Change the device selected in Recording Control from Microphone to Wave Out Play a small audio clip (wav or mp3) Change the deviced selected in Recording Control from Wave Out to Microphone This would be in the form of a gui with buttons for each sound clip (beep, hello, goodbye), pressing one of these buttons would perform the above action and play the sound bite requested. To configure it I would to add something that would allow the user to edit the name of the button and the file (& it's location). Sutefan
-
Replace a batch file with a autoit .exe
sutefan replied to sutefan's topic in AutoIt General Help and Support
My first question Can Environmental Variables be used in AutoIt? So in this case for the above script I would want to replace all instances of C:\SOPHIDE with %TEMP% and %SystemDrive%. I've tried this but the Auto SyntaxCheck in SciTE says there are 0 error but when I do a check run it comes up with the following error: (5) : ==> Unable to execute the external program.: RunWait('%TEMP%\IDES.EXE') The system cannot find the file specified. I assume this is because there is no ides.exe file in %TEMP%. So I moved the FileDelete lines down to the bottom of the script so the files are deleted after the update is complete. This also fails with the same error as above. #NoTrayIcon InetGet('http://www.sophos.com/downloads/ide/ides.exe', '%TEMP%\IDES.EXE', 1) RunWait('%TEMP%\IDES.EXE') FileCopy('%TEMP%\*.IDE', '%SystemDrive%\Sophos~1\', 1) RunWait('NET STOP SWEEPSRV.SYS', '', @SW_HIDE) RunWait('NET START SWEEPSRV.SYS', '', @SW_HIDE) FileDelete('%TEMP%\*.IDE') FileDelete('%TEMP%\IDES.EXE') Sutefan -
Replace a batch file with a autoit .exe
sutefan replied to sutefan's topic in AutoIt General Help and Support
Excellent Much appreciated Have some more questions but I want to lookup those functions so that I understand what's happening. Thanks Again Sutefan