clipboard and sending keys - Forum

Forum Navigation
Climate strike banner
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

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

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:

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.