ForsakenGod Posted November 24, 2009 Share Posted November 24, 2009 Hello, I would like to ask when somethink is putted into clip in a format ClipPut( $part1 & " ColorUP-" & $part2 & " ColorDown-" & $part3 & " Buy-" & $part4 & " Sell-" & $part5 & " Nakup/Predaj-" & $part6 & " Ok-" & $part7) So the actual think in clip is Coord- coor1,coor2,coor3,coor4 ColorUP-Color1 ColorDown-Color2 etc etc I woud like to read from clip and set theese Coor 1 Coor2 etc to different inputboxxes so its automated after a press of button is that possiblee I ve looked into the Help file but didnt find anythink . Thank you for you time Link to comment Share on other sites More sharing options...
ForsakenGod Posted November 25, 2009 Author Share Posted November 25, 2009 (edited) Anyone ? Edited November 25, 2009 by ForsakenGod Link to comment Share on other sites More sharing options...
water Posted November 25, 2009 Share Posted November 25, 2009 It's possible You want to assign a string that you get from the clipboard to multiple variables. So you have to split the string. You need a separator so the StringSplit function knows where to split. Is this the comma or the dash in your case? To make it easier you could separate the variables with @CRLF before writing it to the clipboard. Its easier to separate them again. Why do you write to the clipboard at all? Is the information needed by a different program? My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
ForsakenGod Posted November 25, 2009 Author Share Posted November 25, 2009 (edited) It's possible You want to assign a string that you get from the clipboard to multiple variables. So you have to split the string. You need a separator so the StringSplit function knows where to split. Is this the comma or the dash in your case?To make it easier you could separate the variables with @CRLF before writing it to the clipboard. Its easier to separate them again.Why do you write to the clipboard at all? Is the information needed by a different program?Yes barely its needdet by a different programm . Could you Show me an example code ? For example output of clipput is Coords-1247,69,1547,73 how to split it up ? Edited November 25, 2009 by ForsakenGod Link to comment Share on other sites More sharing options...
water Posted November 25, 2009 Share Posted November 25, 2009 Something like this: #include <array.au3> $sCoords = "Coords-1247,69,1547,73" $aSplit = StringSplit($sCoords,",") $aSplit[1] = StringMid($aSplit[1],8) _ArrayDisplay($aSplit)It assumes that "Coords-" is a literal and can be removed. The values are separated by ",". As a result you get an array with the number of elements in $aSplit[0]. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
water Posted November 25, 2009 Share Posted November 25, 2009 Hi, could you please try this skript: expandcollapse popup#include <array.au3> $sString = "Coords 0,0,10,70 ColorUP-15791353 ColorDown-255 Buy-105,63 Sell-28,57 Nakup/Predaj-903,705 Ok-783,562" $aSplit1 = StringSplit($sString," ") $aSplit2 = StringSplit($aSplit1[2],",") $Input1 = $aSplit2[1] $Input2 = $aSplit2[2] $Input3 = $aSplit2[3] $Input4 = $aSplit2[4] $aSplit2 = StringSplit($aSplit1[3],"-") $PrvaFarba = $aSplit2[2] $aSplit2 = StringSplit($aSplit1[4],"-") $DruhaFarba = $aSplit2[2] $aSplit2 = StringSplit($aSplit1[5],"-") $aSplit2 = StringSplit($aSplit2[2],",") $BuyCoor1 = $aSplit2[1] $BuyCoor2 = $aSplit2[2] $aSplit2 = StringSplit($aSplit1[6],"-") $aSplit2 = StringSplit($aSplit2[2],",") $SellCoor1 = $aSplit2[1] $SellCoor2 = $aSplit2[2] $aSplit2 = StringSplit($aSplit1[7],"-") $aSplit2 = StringSplit($aSplit2[2],",") $OkPressCoor1 = $aSplit2[1] $OkPressCoor2 = $aSplit2[2] $aSplit2 = StringSplit($aSplit1[8],"-") $aSplit2 = StringSplit($aSplit2[2],",") $OkPressCoor3 = $aSplit2[1] $OkPressCoor4 = $aSplit2[2] ConsoleWrite($Input1 & @CRLF & $Input2 & @CRLF & $Input3 & @CRLF & $Input4 & @CRLF & $PrvaFarba & @CRLF & $DruhaFarba & @CRLF & $BuyCoor1 & @CRLF & $BuyCoor2 & @CRLF & $SellCoor1 & @CRLF & $SellCoor2 & @CRLF & $OkPressCoor1 & @CRLF & $OkPressCoor2 & @CRLF & $OkPressCoor3 & @CRLF & $OkPressCoor4 & @CRLF) My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
ForsakenGod Posted November 25, 2009 Author Share Posted November 25, 2009 Hi, could you please try this skript: expandcollapse popup#include <array.au3> $sString = "Coords 0,0,10,70 ColorUP-15791353 ColorDown-255 Buy-105,63 Sell-28,57 Nakup/Predaj-903,705 Ok-783,562" $aSplit1 = StringSplit($sString," ") $aSplit2 = StringSplit($aSplit1[2],",") $Input1 = $aSplit2[1] $Input2 = $aSplit2[2] $Input3 = $aSplit2[3] $Input4 = $aSplit2[4] $aSplit2 = StringSplit($aSplit1[3],"-") $PrvaFarba = $aSplit2[2] $aSplit2 = StringSplit($aSplit1[4],"-") $DruhaFarba = $aSplit2[2] $aSplit2 = StringSplit($aSplit1[5],"-") $aSplit2 = StringSplit($aSplit2[2],",") $BuyCoor1 = $aSplit2[1] $BuyCoor2 = $aSplit2[2] $aSplit2 = StringSplit($aSplit1[6],"-") $aSplit2 = StringSplit($aSplit2[2],",") $SellCoor1 = $aSplit2[1] $SellCoor2 = $aSplit2[2] $aSplit2 = StringSplit($aSplit1[7],"-") $aSplit2 = StringSplit($aSplit2[2],",") $OkPressCoor1 = $aSplit2[1] $OkPressCoor2 = $aSplit2[2] $aSplit2 = StringSplit($aSplit1[8],"-") $aSplit2 = StringSplit($aSplit2[2],",") $OkPressCoor3 = $aSplit2[1] $OkPressCoor4 = $aSplit2[2] ConsoleWrite($Input1 & @CRLF & $Input2 & @CRLF & $Input3 & @CRLF & $Input4 & @CRLF & $PrvaFarba & @CRLF & $DruhaFarba & @CRLF & $BuyCoor1 & @CRLF & $BuyCoor2 & @CRLF & $SellCoor1 & @CRLF & $SellCoor2 & @CRLF & $OkPressCoor1 & @CRLF & $OkPressCoor2 & @CRLF & $OkPressCoor3 & @CRLF & $OkPressCoor4 & @CRLF) WOW ! Big thanks really really really thank you thanksss ! Works perfect thank youuu ! Now i can finally move on ! 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