not-me Posted November 20, 2006 Share Posted November 20, 2006 Dear all: I want to know how to split the content of clipboard into many variables. Example: $bak = ClipGet() (=123456789 for example) after that i want $bak1=12345 (the first 5th numbers) and $bak2=6789 (the other numbers) Thank you. Link to comment Share on other sites More sharing options...
/dev/null Posted November 20, 2006 Share Posted November 20, 2006 Dear all: I want to know how to split the content of clipboard into many variables. Example: $bak = ClipGet() (=123456789 for example) after that i want $bak1=12345 (the first 5th numbers) and $bak2=6789 (the other numbers) Thank you. StringSplit(), StringLeft(), StringRight(), etc... depends on your "split criteria". In the above case: $bak1 = StringLeft($bak,5) $bak2= StringTrimLeft($bak,5) __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
Pfex Posted November 20, 2006 Share Posted November 20, 2006 (edited) @/dev/null hehe, you beat me to it Hello not-me, the functions that you might find useful are the "string "commands. The Help file has the needed info on them. $bak = ClipGet() $bak1=StringLeft($bak,5) $bak2=StringMid($bak,6,4) oÝ÷ ÚÚºÚ"µÍ ÌÍØZÌTÝ[ÔYÚ ÌÍØZË B Hope this helps. Edited November 20, 2006 by Pfex Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted November 20, 2006 Moderators Share Posted November 20, 2006 $sClip = '123456789' $sLen = StringLen($sClip) $bak1 = StringMid($sClip, 1, 5) $bak2 = StringMid($sClip, 6, $sLen) MsgBox(64, 'Info', $bak1 & @CR & $bak2) Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted November 20, 2006 Moderators Share Posted November 20, 2006 (edited) Million ways to do this... Here's another$sClip = '123456789' $aSRE = StringRegExp($sClip, '(.{5})(.*)', 3) If IsArray($aSRE) Then MsgBox(64, 'StringRegExp', $aSRE[0] & @CR & $aSRE[1])oÝ÷ ØGb´ Ýjz-êÚºÚ"µÍÌÍÜÐÛH ÌÎNÌLÍ MÎIÌÎNÂÌÍØZÌHHÝ[ÓY ÌÍÜÐÛ JBÌÍØZÌHÝ[ÔYÚ ÌÍÜÐÛÝ[Ó[ ÌÍÜÐÛ HHÝ[Ó[ ÌÍØZÌJJBÙÐÞ ÌÎNÉÌÎNË ÌÍØZÌH [ÈÔ [È ÌÍØZÌ Edited November 20, 2006 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
not-me Posted November 20, 2006 Author Share Posted November 20, 2006 Thank you all for ur relpy. it works now 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