Rorka Posted November 5, 2009 Posted November 5, 2009 Okay my question is how do I convert one file, into another. The old file looks like this: [GoTo] z=SetLoopStart(10000, 10000) ;repair z=WP( -707.619, 2739.345, 0, 0, 1 ) z=SleepIt(1500) z=SendIt("{ENTER}") z=SleepIt(1500) z=SendIt("/tar Sid") z=SleepIt(1500) z=SendIt("{ENTER}") z=SleepIt(1500) z=SendIt("{F7}") z=SleepIt(1500) z=SendIt("{ESC}") z=WP( -704.081, 2740.161, 4, 0, 2 ) ect... The new file should look like this: <XAutomationWP>707.619 2739.345 0</XAutomationWP> <XAutomationWP>-704.081 2740.161 4</XAutomationWP> As you can see I only want the lines that start "z=WP(" I only need the first 3 numbers, and the "," need removing. Is this possible in Autoit? Thanks
Moderators Melba23 Posted November 5, 2009 Moderators Posted November 5, 2009 (edited) Rorka, Sure is! I saved your initial file in ini format - because that is what it looked like: expandcollapse popup The <<<<<<<<<<<< lines are just to show what is going on. M23 Edit If it is for botting then do your own dirty work! Edited November 5, 2009 by Melba23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area AwAke Posted November 5, 2009 AwAke Active Members 99 Posted November 5, 2009 (edited) I'm pretty sure this is the same structure PiroxBots use for their configuration, do correct me if I'm wrong however. Where is it you're going with this? I'm just generally intrigued. Edited November 5, 2009 by AwAke GEOSoft Posted November 5, 2009 GEOSoft MVPs 10.3k Sure I'm senile. What's your excuse? Posted November 5, 2009 Good thing you guys brought up Bot. I was just going to reply with the code. So much for that. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Rorka Posted November 5, 2009 Rorka Active Members 105 Author Posted November 5, 2009 Guys, its not for a bot... Its for a program for World of Warcraft that im making, where you can load a profile and it shows the route on a map. I dont want to use the Priox format as I plan to make it work with other peoples profiles. GEOSoft Posted November 5, 2009 GEOSoft MVPs 10.3k Sure I'm senile. What's your excuse? Posted November 5, 2009 Sorry, I don't do game code whether or not it's Bot specific. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" (adsbygoogle = window.adsbygoogle || []).push({}); Moderators Melba23 Posted November 5, 2009 Melba23 Moderators 31.2k 480 I'm old, what's your excuse? Moderators Posted November 5, 2009 Sorry, but the same goes for me - if I notice. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Rorka Posted November 5, 2009 Rorka Active Members 105 Author Posted November 5, 2009 If i get some tips ill do it my self... GEOSoft Posted November 5, 2009 GEOSoft MVPs 10.3k Sure I'm senile. What's your excuse? Posted November 5, 2009 This will get you started but after that I'm out. $sStr = FileRead("somefile.ini") $sStr = StringRegExpReplace($sStr, "(?i)(?m:^)z=WP.*\(.*(\-\d+\.\d+),(\s\d+\.\d+),(\s\d+?)\V+", _ "<XAutomationWP>$1$2$3</XAutomationWP>") If @Extended Then $aHold = StringRegExp($sStr, "(?i)(<.*>)", 3) If NOT @Error Then $sStr = "" For $i = 0 To UBound($aHold) -1 $sStr &= $aHold[$i] & @CRLF Next $sStr = StringStripWS($sStr, 2) EndIf MsgBox(0, "test", $sStr) EndIf George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!"
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now