Source language: Translate to:

Copy Put and Paste? Fonctions (little question)

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

Copy Put and Paste? Fonctions (little question)

Postby lama » Thu Aug 10, 2006 9:41 am

Helle every body, i have a question...

How can I add functions “to copy”, “to stick” and “to cross” in my pragramme? It is to take text and to stick it in the program.


Thank.
Loïc
Last edited by lama on Thu Aug 10, 2006 3:27 pm, edited 2 times in total.
lama
 
Posts: 16
Joined: Tue Jul 04, 2006 3:21 pm

Postby Alberto_Meyer » Thu Aug 10, 2006 9:47 am

Is it Copy, Put and Paste?
TechMedia Software PlugIns
Plugins: www.techmediasoftware.com
Shareware: www.meyertools.com
User avatar
Alberto_Meyer
 
Posts: 385
Joined: Tue May 03, 2005 5:14 am

Postby lama » Thu Aug 10, 2006 10:16 am

Alberto_Meyer wrote:Is it Copy, Put and Paste?


heu yes ^^ (the translator isn't very good ^^)
lama
 
Posts: 16
Joined: Tue Jul 04, 2006 3:21 pm

Postby Neosoft Support » Thu Aug 10, 2006 11:02 am

NeoBook includes a global variable called [Cliboard] that can be used to read and write text to the Windows clipboard. For example, to write text to the clipboard you can do this:

SetVar "[Clipboard]" "Here is some text..."

To copy text from the clipboard to another variable, do this:

SetVar "[MyVar]" "[Clipboard]"
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5593
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Postby lama » Thu Aug 10, 2006 11:15 am

Ok but I have a lot of variable....that I would like to copy to put all of them. I must define all my variables with

SetVar “[Clipboard]” “[variable1]”
SetVar “[Clipboard]” “[variable2]”
SetVar “[Clipboard]” “[variable3]”
and
SetVar “[variable1]” “[Clipboard]”
SetVar “[variable1]” “[Clipboard]”
SetVar “[variable1]” “[Clipboard]”
etc

???

Thanks
lama
 
Posts: 16
Joined: Tue Jul 04, 2006 3:21 pm

Postby Wrangler » Fri Aug 11, 2006 7:40 am

No. Each time you copy to the clipboard, it overwrites the last copy. Would be best here to write each variable content to a file, one per line, and then read them back in using fileread and a loop:

FileLen "sample.txt" "[FLen]"
Loop "1" "[FLen]" "[X]"
FileRead "sample.txt" "[X]" "[Name[X]]"
EndLoop

../ Process array
Loop "1" "[FLen]" "[X]"
...actions here
EndLoop
Wrangler
--------------
"You never know about a woman. Whether she'll laugh, cry or go for a gun." - Louis L'Amour

Windows 7 Ultimate SP1 64bit
16GB Ram
Asus GTX 950 OC Strix
Software made with NeoBook
http://highdesertsoftware.com
User avatar
Wrangler
 
Posts: 1505
Joined: Thu Mar 31, 2005 11:40 pm
Location: USA

Postby Cipolla » Mon Aug 14, 2006 12:23 am

You could also build a clipboard string with a delimiter, i.e.

SetVar "[clipboard]" "[var1];[var2];[var3];[var4];etc..."

Then when pasting the vars simply parse the string and you get the values back.

StrParse "[Clipboard]" ";" "[var]" "[temp]"

Will result in:

var1=content1
var2=content2
var3=content3
etc....
Greetings from Germany
Klaus
User avatar
Cipolla
 
Posts: 166
Joined: Fri Apr 01, 2005 1:45 am
Location: Germany


Return to NeoBook Action Commands

Who is online

Users browsing this forum: No registered users and 1 guest