clipboard and sending keys - Forum

Forum Navigation
You need to log in to create posts and topics.

clipboard and sending keys

One or two beginners questions:

I have a simple form with a TextEntry control and a push button. How do I make the push button copy all the text from the TextEntry control ([TextEntry1} variable) to the clipboard?
And it is also possible to write to the clipboard immediately upon text change, without the pushbutton?

Also, what is the NEO SendKeys syntax when combining modifier keys with Function and regular keys (e.g Alt+F4, Ctrl+a, Alt+e etc)?

Hello,

For sendkeys take a look at the doc:

https://winhelp.visualneo.com/Applications.html#SENDKEYS

From:

https://winhelp.visualneo.com/PredefinedGlobalVariables.html

SetVar "[Clipboard]" "[TextEntry1]"

Regards

luishp has reacted to this post.
luishp

Thank you! I will check that out, seems most helpful.

luishp has reacted to this post.
luishp

How do you share code on this forum?

I keep getting a WordPress security blocker.

........... This is the action for ChromeTimer1.  It scans for keywords in the clipboard every second.

SearchStr "WinGoSub" "[Clipboard]" "[ix]" "CaseSensitive"
If "[ix]" ">" "0"
gotoline "winsub"
Return
EndIf

Return
.

. This method reads from the clipboard.

:winsub

SetVar "[ClipboardLocker]" "[Clipboard]"
SetVar "[ii]" "[Clipboard]"
SetVar "[Clipboard]" ""

StrReplace "[ii]" "WinGoSub" "" "[i]" "CaseSensitive"
StrReplace "[i]" "[#34]" "" "[ii]" "CaseSensitive"
StrReplace "[ii]" " " "" "[i]" "CaseSensitive"
SetVar "[ClipboardLocker]" "[i]"
MessageBox "ChromeNEO Win" "Message to [PubTitle]:||Data transferred from Chrome.||Will run this Action command: |GoSub [#34][i][#34]|if you click on the 'Yes' button." " Yes | No " "[ix]"
EndIf

If "[ix]" "=" "1"
TimerStop "ChromeTimer1"
GoSub "[i]"
Delay "500"
TimerStart "ChromeTimer1" "1111"
ClearVariables "[i],[ii],[ix],[ClipboardLocker]"
Return
Else
.SetVar "[Clipboard]" ""
ClearVariables "[i],[ii],[ix],[ClipboardLocker]"
Return
EndIf

SetVar "[Clipboard]" "[ClipboardLocker]"
ClearVariables "[ClipboardLocker]"
Return

........GoSub "[i]"............. a subroutine must exist with the same name

 

SendKeys "[yourapp]" "{CtrlDn}{AltDn}{ShiftDn}1{ShiftUp}{AltUp}{CtrlUp}"<br<
It sends control, alt, shift, 1 as a multiple keypress combination not used by another application. After a slight delay it pastes data into the browser with control, v<br<
Delay "250"<br<
SendKeys ""[yourapp]"" "{CtrlDn}v{CtrlUp}"<br<
The following script in the browser then interprets the keypress code from VisualNEO Win. <br<
(key 1 = 49, key 2 = 50, key 3 = 51, and so on)<br<
<script<<br<

java script has been blocked by forum security so here is a screenshot.

Change some variables to match your app's.

How do you share code on this forum?

@fkapnist There is a "Code Insert" button on the text editor:

fkapnist has reacted to this post.
fkapnist

Thank you fkapnist really appreciate it!

Quote from luishp on January 13, 2019, 8:06 pm

How do you share code on this forum?

@fkapnist There is a "Code Insert" button on the text editor:

That is odd. I am not able find the Code Insert button anywhere in the text editor using both Firefox and Chrome. The keyboard shortcut for Code says it is "shift alt x" but that does not work.

wait i think it must be this... shift alt x does work after all

@fkapnist, I will check it. Perhaps it's a permissions problem.
Sorry.

@fkapnist, you should be able to add code now.
It was a permissions problem, now solved for every forum user.
Thank you!

Quote from luishp on January 15, 2019, 1:23 pm

@fkapnist, you should be able to add code now.
It was a permissions problem, now solved for every forum user.
Thank you!

It displays correctly when I post but when I reload the page I see it is full of   < span > tags and CSS

It displays correctly when I post but when I reload the page I see it is full of < span > tags and CSS

That's becouse some file has not download fine. If that happens, try to reload again please.

I've had some strange behavior when trying to send the left,up,right,down keys to a program ..  Sometimes it works, then it just stops I must be doing something wrong here..  The program always receives the key entry for ALT but it's the direction key that stops working.

I found on the old forums that using [#37] was the given method for Left ..  Is it possible my issue is VisualNeo is just making that  a variable which is empty?

SendKeys "[prog_id]" "{AltDn}[#37]{AltUp}"

Any ideas?

 

@darbdenral

SendKeys "[prog_id]" "{AltDn}[#37]{AltUp}"

Any ideas?

Have you tried ...

SendKeys "[prog_id]" "{AltDn}{Left}{AltUp}"
SendKeys "[prog_id]" "{AltDn}(Right}{AltUp}"
SendKeys "[prog_id]" "{AltDn}(Up}{AltUp}"
SendKeys "[prog_id]" "{AltDn}(Down}{AltUp}"

... or if you just need the arrow keys without the Alt key being held down ...

SendKeys "[prog_id]" "{Left}"
SendKeys "[prog_id]" "(Right}"
SendKeys "[prog_id]" "(Up}"
SendKeys "[prog_id]" "(Down}"

 

luishp and Darbdenral have reacted to this post.
luishpDarbdenral

That works!  I had to change some coding in my receiving app but that put me on the right path..  I'm pretty sure I had used that previously in my many hours of failed attempts..  :)

Thank you Gaev!

Open chat
1
Do you need more info?
Hi, do you have any doubt?