ne0trace Posted January 11, 2008 Share Posted January 11, 2008 Hello, I have a variable which looks like this: "12345 - 12389 - 6789 - ...". This is called $variable1 right now. But when I try to paste this information I need split it up. The first block "12345" pasted in the fist box and so on. How can I modify the serial number so it fits in the edit box? Felix Link to comment Share on other sites More sharing options...
martin Posted January 11, 2008 Share Posted January 11, 2008 Hello, I have a variable which looks like this: "12345 - 12389 - 6789 - ...". This is called $variable1 right now. But when I try to paste this information I need split it up. The first block "12345" pasted in the fist box and so on. How can I modify the serial number so it fits in the edit box? Felix Using stringSplit would be an easy way. $stringArray = StringSplit($variable1,'-') GuiCtrlSetData($edit1, $StringArray[1]).... Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
PsaltyDS Posted January 11, 2008 Share Posted January 11, 2008 Hello,I have a variable which looks like this: "12345 - 12389 - 6789 - ...". This is called $variable1 right now. But when I try to paste this information I need split it up. The first block "12345" pasted in the fist box and so on. How can I modify the serial number so it fits in the edit box?FelixYou can split characters with: $avArray = StringSplit($variable1, " - ", 1)Then you can just loop through the array to put the values where you need them. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law 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