Sign in to follow this  
Followers 0
Jimtags

GET THE CHAR

9 posts in this topic

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

Share this post


Link to post
Share on other sites



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!): :unsure:

#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._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

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!): :unsure:

#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

Share this post


Link to post
Share on other sites

Jimtags,

Glad I could help. :unsure:

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._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

#5 ·  Posted (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. :unsure:

M23

I 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 by trancexx

♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

trancexx,

Then this post is going to seem impolite to you. :unsure:

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._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

Then this post is going to seem impolite to you. :unsure:

I said almost :>

♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

trancexx,

Then let us not quarrel over trifles. :>

Imaju dobar vikend. :unsure:

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

There is something about your English that turns me on. Weird.


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0