Jump to content

count the amount of characters


Recommended Posts

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

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 by Burrup

qq

Link to comment
Share on other sites

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...