Berend Jan Posted May 1, 2005 Share Posted May 1, 2005 Hi guys, I was wondering if it is possible to count the amount of characters that you have on your clipboard. This because i need to edit the content of the clipboard and for that I need to know how many characters are there to adapt my script to. f.e.: Geld: 918,663 or Geld: 300,918,663 When I edit these numbers with the backspace function in notepad the two possibilities will get a different output. The long version (Geld: 300,918,663) will be fine. Though I need to get the small version (Geld: 918,663) going as well. I'd like to get something like this: If $characters > 15 Then _Bank1() Else _Bank2() EndIf This is how i edit the numbers now: Send ("^c") Run ("Notepad.exe") WinWaitActive ("Naamloos - Kladblok", "", 5) Send ("^v") Send ("{LEFT}{LEFT}{LEFT}{BS}{LEFT}{LEFT}{LEFT}{BS}{LEFT}{LEFT}{LEFT}{BS}{BS}{BS}{BS}{BS}{BS}{BS}{BS}{B S}{BS}{BS}{BS}") Send ("^a") Send ("^c") I hope you guys can help me out here. Berend Jan Link to comment Share on other sites More sharing options...
buzz44 Posted May 1, 2005 Share Posted May 1, 2005 (edited) ClipPut("I am in the clip board") MsgBox(0,"", "Clip board contains: " & StringLen (ClipGet()) & " characters." & @CRLF & "Clip board: " & "'" & ClipGet() & "'") If StringLen (ClipGet()) > 15 Then MsgBox(0,"","There are more than 15 characters in the clip board.") Else MsgBox(0,"","There are less than 15 characters in the clip board.") EndIf Edited May 1, 2005 by Burrup qq Link to comment Share on other sites More sharing options...
Berend Jan Posted May 1, 2005 Author Share Posted May 1, 2005 ClipPut("I am in the clip board") MsgBox(0,"", "Clip board contains: " & StringLen (ClipGet()) & " characters." & @CRLF & "Clip board: " & "'" & ClipGet() & "'") If StringLen (ClipGet()) > 15 Then MsgBox(0,"","There are more than 15 characters in the clip board.") Else MsgBox(0,"","There are less than 15 characters in the clip board.") EndIf<{POST_SNAPBACK}>Thx this really set me on the right track. got the perfect solution 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