Jump to content

read marked text


Recommended Posts

This is what i could come up with, far from finish, but it might give you an idea how to continue.

HotKeySet('!w', 'Copy'); Set Alt-W to copy
  Sleep ( 5000 )
Func Copy(); Alt-W Hotkey function

ClipPut("Test")
MsgBox(0, "Clipboard contains:", ClipGet())
EndFunc

You need to change the "Test" to use Copy (CTRL+C) and also make the program stay idle, and not only for 5 seconds :idiot:

Edited by Doxie

Were ever i lay my script is my home...

Link to comment
Share on other sites

This is what i could come up with, far from finish, but it might give you an idea how to continue.

HotKeySet('!w', 'Copy'); Set Alt-W to copy
  Sleep ( 5000 )
Func Copy(); Alt-W Hotkey function

ClipPut("Test")
MsgBox(0, "Clipboard contains:", ClipGet())
EndFunc

You need to change the "Test" to use Copy (CTRL+C) and also make the program stay idle, and not only for 5 seconds :idiot:

<{POST_SNAPBACK}>

the reson is that im trying to improve the clibbord in windows so i can save more information then normal, when i know more about this i mey improve the file/picture part to if this can be done in autoit.

here is what i have so far, my idea was to make my own clibbord without eny use of the one in windows. but it might be beter to use it.

-----

;here im trying to copy the information to my own clibbord

;a text file at my hard drive, witch can contain moch more information

HotKeySet('!w', 'Copy'); Set Alt-w to copy

Func Copy(); Alt-W Hotkey function

$cb = ClipGet()

IniWrite(@scriptdir & "\bord.ini", "bord", "1", $cb)

EndFunc

$idle = 0

Do

Sleep ( 100 )

Until $idle = 10

Edited by HARNOvHARNO
Link to comment
Share on other sites

May i ask what you gonna use it for?

I see you use $cb, is it for Utopia? :idiot:

<{POST_SNAPBACK}>

cb - clibbord

its my dad there need it to copy some bank account numbers when paying bills, and it might be usefull for other stuff aswhell. i think its a grath idea to improve the clibbord in windows a little. :-)

here is my script, for now its seying

Send{CTRLUP}

Send^ËRROR

error: unable to parse line

---when running this below---

HotKeySet('!1', 'Copy1'); Set Alt-1 to copy
Func Copy1(); Alt-1 Hotkey function

Send("{CTRLDOWN}");Holds the CTRL key down until {CTRLUP} is sent
Send("{c down}");Holds the c key down until {c up} is sent
Send{CTRLUP};Releases the Ctrl key
Send{c up};Releases the c key

    $cb = ClipGet();gets data from clibbord
    IniWrite(@scriptdir & "\bord.ini", "bord", "1", $cb);saves it to a file

EndFunc

HotKeySet('!2', 'Copy2'); Set Alt-2 to copy
Func Copy2(); Alt-2 Hotkey function

Send("{CTRLDOWN}");Holds the CTRL key down until {CTRLUP} is sent
Send("{c down}");Holds the c key down until {c up} is sent
Send{CTRLUP};Releases the Ctrl key
Send{c up};Releases the c key

    $cb = ClipGet();gets data from clibbord
    IniWrite(@scriptdir & "\bord.ini", "bord", "2", $cb);saves it to a file

EndFunc



$idle = 0
Do
  Sleep ( 100 )
Until $idle = 10

---okay a way that allmost works---

HotKeySet('!1', 'Copy1'); Set Alt-1 to copy
Func Copy1(); Alt-1 Hotkey function

Send("^c") 

    $cb = ClipGet();gets data from clibbord
    IniWrite(@scriptdir & "\bord.ini", "bord", "1", $cb);saves it to a file

EndFunc

HotKeySet('!2', 'Copy2'); Set Alt-2 to copy
Func Copy2(); Alt-2 Hotkey function

Send("^c")

    $cb = ClipGet();gets data from clibbord
    IniWrite(@scriptdir & "\bord.ini", "bord", "2", $cb);saves it to a file

EndFunc



$idle = 0
Do
  Sleep ( 100 )
Until $idle = 10

but this will not copy the marked text i relly dont understand why, ctrl + c is send right?

i did also try to use Opt("SendKeyDownDelay", 500) dident seam to help

Edit:im rather stuck for now, just cant think of a way to push ctrl c, remember that the script dose not need to mark the text, im marking the text to copy and pressing the Hotkey that will copy/save the text in a file for later use... either i need a function or script to copy marked text, or a function or script that will press ctrl+c and that way copy the text i marked.....

Edited by HARNOvHARNO
Link to comment
Share on other sites

i do not understand this...

i tryed to rename a file and then hit alt + 1

and another file alt + 2

it did save the file names in my file. i was happy as it worked.

[bord]

1=filename1

2=filename2

but when im marking text in firefox or notepad it just seys a windows "ding" sound and wont copy the text i marked why is this?

im doing a - Send ("^c") so wouldent it be the same as pressing ctrl + c? why cant i copy marked text in firefox or notepad with Send ("^c") ?

Edited by HARNOvHARNO
Link to comment
Share on other sites

Send("{CTRLDOWN}") ;Holds the CTRL key down until {CTRLUP} is sent

Send("{c down}") ;Holds the c key down until {c up} is sent

Send{CTRLUP} ;Releases the Ctrl key

Send{c up} ;Releases the c key

<{POST_SNAPBACK}>

Send{CTRLUP} Should be Send("{CTRLUP}")

and

Send{c up} should be Send("{c up}")

We have enough youth. How about a fountain of SMART?

Link to comment
Share on other sites

Send{CTRLUP} Should be Send("{CTRLUP}")

and

Send{c up} should be Send("{c up}")

<{POST_SNAPBACK}>

i could not get the other code to work so im trying "Send ("^c")" right now.

so far i can only get it to work at file names.

it wont copy marked text from other windows.

when hitting alt+1 at marked text in firefox or notepad it just seys a enoring ding sound.

edit: somhow its the alt key, when only useing "1" as Hotkey there are no problems.

meybe alt+1 is in use by windows so im just trying some other hotkeys. thank you for trying to help me :-)

Edited by HARNOvHARNO
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...