Jimtags Posted April 16, 2011 Posted April 16, 2011 I'm tired searching the forum but I don't see a good example.. What I want is to get the string in a sentence.. for example: "Your balance is '0'" How can I get the 0 in the sentence? This is my script. UDPStartup() $o_Socket = UDPOpen("192.168.1.11", 28960, 1) $ReadDvar = Chr(255)&Chr(255)&Chr(255)&Chr(255)&"rcon openwsvr1 dvardump dedicated" Sleep(1000) UDPSend($o_Socket, $ReadDvar) Sleep(1000) $o_Dump = UDPRecv($o_Socket, 6000) MsgBox(0, "", $o_Dump) UDPShutdown() The result of this is ÿÿÿÿprint =============================== DVAR DUMP ======================================== dedicated "dedicated LAN server" 1481 total dvars 1481 dvar indexes =============================== END DVAR DUMP ===================================== I only to get the 'dedicated LAN server' word.. I tried _ArrayDisplay but what I want is the string only. _ArrayDisplay has a window.. Any help people!... T_T
Moderators Melba23 Posted April 16, 2011 Moderators Posted April 16, 2011 Jimtags,Either use an SRE directly: $sText = 'ÿÿÿÿprint' & @CRLF & _ '=============================== DVAR DUMP ========================================' & @CRLF & _ 'dedicated "dedicated LAN server"' & @CRLF & _ @CRLF & _ '1481 total dvars' & @CRLF & _ '1481 dvar indexes' & @CRLF & _ '=============================== END DVAR DUMP =====================================' $aServer = StringRegExp($sText, '"(.*)"', 3) ConsoleWrite($aServer[0] & @CRLF)or _StringBetween (which does exactly the same thing but hides the SRE!): #include <String.au3> $sText = 'ÿÿÿÿprint' & @CRLF & _ '=============================== DVAR DUMP ========================================' & @CRLF & _ 'dedicated "dedicated LAN server"' & @CRLF & _ @CRLF & _ '1481 total dvars' & @CRLF & _ '1481 dvar indexes' & @CRLF & _ '=============================== END DVAR DUMP =====================================' $aServer = _StringBetween($sText, '"', '"') ConsoleWrite($aServer[0] & @CRLF)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
Jimtags Posted April 16, 2011 Author Posted April 16, 2011 Jimtags, Either use an SRE directly: $sText = 'ÿÿÿÿprint' & @CRLF & _ '=============================== DVAR DUMP ========================================' & @CRLF & _ 'dedicated "dedicated LAN server"' & @CRLF & _ @CRLF & _ '1481 total dvars' & @CRLF & _ '1481 dvar indexes' & @CRLF & _ '=============================== END DVAR DUMP =====================================' $aServer = StringRegExp($sText, '"(.*)"', 3) ConsoleWrite($aServer[0] & @CRLF) or _StringBetween (which does exactly the same thing but hides the SRE!): #include <String.au3> $sText = 'ÿÿÿÿprint' & @CRLF & _ '=============================== DVAR DUMP ========================================' & @CRLF & _ 'dedicated "dedicated LAN server"' & @CRLF & _ @CRLF & _ '1481 total dvars' & @CRLF & _ '1481 dvar indexes' & @CRLF & _ '=============================== END DVAR DUMP =====================================' $aServer = _StringBetween($sText, '"', '"') ConsoleWrite($aServer[0] & @CRLF) M23 Thank you very much... Now I can proceed... I was stock here! ^.^v
Moderators Melba23 Posted April 16, 2011 Moderators Posted April 16, 2011 Jimtags,Glad I could help. By the way, when you reply please use the "Add Reply" button at the top and bottom of the page rather then the "Reply" button in the post itself. That way you do not get the contents of the previous post quoted in your reply and the whole thread becomes easier to read. 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
trancexx Posted April 16, 2011 Posted April 16, 2011 (edited) By the way, when you reply please use the "Add Reply" button at the top and bottom of the page rather then the "Reply" button in the post itself. That way you do not get the contents of the previous post quoted in your reply and the whole thread becomes easier to read. M23I hate when you say that. One of the most basic rules of some forum conversation is to quote the post one replies to. There are number of reasons why direct reply shouldn't be done without the quote. In fact, direct reply without the quote I would consider almost impolite.This is all IMO naturally.This thread is really only one of the exceptions. Edited April 16, 2011 by trancexx ♡♡♡ . eMyvnE
Moderators Melba23 Posted April 16, 2011 Moderators Posted April 16, 2011 trancexx,Then this post is going to seem impolite to you. I have no problem with quotes which highlight a relevant section of the previous post - what I object to is the inclusion of the entire previous post when it serves no purpose, as was the case above."This is all IMO naturally" (and I deliberately decided not to use the quote facility to say that ).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
trancexx Posted April 16, 2011 Posted April 16, 2011 Then this post is going to seem impolite to you. I said almost ♡♡♡ . eMyvnE
Moderators Melba23 Posted April 16, 2011 Moderators Posted April 16, 2011 trancexx, Then let us not quarrel over trifles. Imaju dobar vikend. 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
trancexx Posted April 16, 2011 Posted April 16, 2011 There is something about your English that turns me on. Weird. ♡♡♡ . eMyvnE
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