Help - Search - Members - Calendar
Full Version: A Clipboard Constant
AC Tools Everything Macro > AC Tool Macros > Macro Development
dassanderlein
Hey all
where or what is a variable or a code for a number or text that is safed in the clipboard

pls help
Bear
Have you tried looking in the Help File?

SetClipBoard, GetClipBoard & PasteClipBoard
dassanderlein
i don`t know how i have to use the command

do you explain me? ,pls

thanks at all!
Bear
What part of Looking in the Help File did you Not Understand? Start ACTools, Click Help, Click ACTool Help, Click the Plus next to AC Tool Commands, scroll down to GetClipboard..

QUOTE(Ac Tool Help File)
GetClipboard

Description
Copies the text contents of the clipboard into a constant.

Parameters
Any defined constant.

CODE
constants
   Test=Nothing
end
  
SetClipboard $Test
SetConst $Test = Nada
GetClipboard $Test
PasteClipboard $Test
dassanderlein
IT works!

thanks bear


But now i have another problem:

IF $Clipboard contains sometext or $Clipboard contains somethinelsetext
or thisone:
If $clipboard = sometext or $clipboard = someothertext
doesnt work for me

there is an error showed
the clipboard works, but the form is incorrect
Bear
You can't use $Clipboard unless your using $Clipboard as your Constant Holding Variable. And you would use "=" instead of "Contains", it's easier if your comparing $Clipboard against another Constant.

CODE
constants
   ClipBoard = {Null}
   Test1 = SomeText
   Test2 = SomeOtherText
   Test3 = TotallyFalse
end
  
SetClipboard $Clipboard
Set $Clipboard,$Test3
IF $ClipBoard = $Test1 or $Clipboard = $Test2
  // True
  GetClipboard $ClipBoard
  PasteClipboard $ClipBoard
Else
  // False
  SayPaste $Clipboard
End


Saypaste may not work with your Application, Keys seems to be the general usage for most other applications other then Turbine type Games. Now, the Second line: "Set $Clipboard,<Value>", since it's set for test3 it's gonna return a False, if you have it set for test1 or test2 it'll be True.. "Doh, right.. blink.gif " tongue.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.