scila1996 Posted August 29, 2014 Share Posted August 29, 2014 I have a piece of string " Hello ABC AXY" = [3] How to Get the Word in "..." ---> Assign to variable $a Get the Charactor in [ .... ] ---> Assign to variable $b Thank you Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 29, 2014 Moderators Share Posted August 29, 2014 scila1996,Looking at _StringBetween in the Help file seems like a good place to start. 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 Link to comment Share on other sites More sharing options...
scila1996 Posted August 29, 2014 Author Share Posted August 29, 2014 Thank Melba23 Can you tell me more questions? In the programming language C ++. I use char * a = "Hello"; for (int i = 0; i <= strlen (a); i ++) { cout << a [i]; } With AutoIt. How we can read each character in a code sequence like C / C ++ above? Link to comment Share on other sites More sharing options...
MikahS Posted August 29, 2014 Share Posted August 29, 2014 If I'm not mistaken an easyFor...Next loop? Snips & Scripts My Snips: graphCPUTemp ~ getENVvarsMy Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4 Feel free to use any of my code for your own use. Forum FAQ Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 29, 2014 Moderators Share Posted August 29, 2014 scila1996,As MikahS has suggested a loop is the way to go, but first you would have to split the string into characters:#include <MsgBoxConstants.au3> ; Here is the string $sString = "Hello" ; Now split it into individual characters $aChars = StringSplit($sString, "") ; Now loop through them - the count is in the [0] element For $i = 1 To $aChars[0] MsgBox($MB_SYSTEMMODAL, $i, $aChars[$i]) NextAll clear? 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 Link to comment Share on other sites More sharing options...
scila1996 Posted August 29, 2014 Author Share Posted August 29, 2014 Melba23 MikahS Thank you very much ! Wish you a good day ! Link to comment Share on other sites More sharing options...
MikahS Posted August 29, 2014 Share Posted August 29, 2014 Anytime! Snips & Scripts My Snips: graphCPUTemp ~ getENVvarsMy Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4 Feel free to use any of my code for your own use. Forum FAQ Link to comment Share on other sites More sharing options...
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