Is this possible? If not what is the best way to assign a variable to 2 different Integers captured by the clipboard?
Thank you
Clipboard1, Clipboard2?
Re: Clipboard1, Clipboard2?
example , F7 copy , F8 show all copied
Code: Select all
;- copy marked text
$f7::
clipboard:=""
sendinput, ^c{right}
clipwait,2
cl .= clipboard . "`r`n-----------------------`r`n"
msgbox, 262208,,%clipboard%,1
clipboard=
return
;- show clipboard all
$F8::
msgbox, 262208,,%cl%,
return
Re: Clipboard1, Clipboard2?
Thanks Gary, how to clear %cl% ?? clear it from the clipboard, period ?garry wrote:example , F7 copy , F8 show all copiedCode: Select all
;- copy marked text $f7:: clipboard:="" sendinput, ^c{right} clipwait,2 cl .= clipboard . "`r`n-----------------------`r`n" msgbox, 262208,,%clipboard%,1 clipboard= return ;- show clipboard all $F8:: msgbox, 262208,,%cl%, return
Re: Clipboard1, Clipboard2?
to clear cl >> cl=
maybe add
maybe add
Code: Select all
$F9::
cl=
return
Re: Clipboard1, Clipboard2?
My issue is this...IF cl is 'empty' meaning nothing was copied, then exit the code and wait for +F7 to be pressed again. It keeps failing...not sure why.garry wrote:to clear cl >> cl=
maybe addCode: Select all
$F9:: cl= return
Its the (part of code)
If cl=
Exit
Else
..part that isnt working...If nothing is copied, then EXIT and wait for SHIFT F7 again
Also, is Clip:="" the same as Clip= ??
Code: Select all
; Service Fee - Credit
+F7::
SetTitleMatchMode, 2
IfWinExist, Cash Register Express
{
Send, +{Left 6}
sleep 50
Send, ^{Ins} ; Copy into Clip1
clipboard:=""
; sendinput, ^c{right}
clipwait,1
cl .= clipboard
Send, {Backspace}
If cl=
Exit
else
; Customer presses Credit Debit button
Clipboard=
send,!p
send, %cl%
send, !c
Send, ^{Ins}
; Cancel back to Invoice Screen
Send, !n
; Send ItemNum into 'Scan Barcode Now...' - 1236
Send, 1236{Enter}
; THANK YOU
; Has tagalong 1234 SERVICE FEE .035
; Paste 0.035 in the Pay Applet in the Quantity
Send, 0.035
Send, !o
; Paste Amount from contents copied from the Pay Applet in the Price
Send, ^v
Send, !o
; Press OK on Enter Price Service Fee applet
; Initiate Credit Debit applet, directly
Send, !p
; WinActivate, Cash Register Express
Sleep 100
send, %cl%
Send, !c
Send, !r!r
Sleep, 2000
#Persistent
SetTimer, Alert1, 20
return
Alert1:
IfWinNotExist, Payment Processor Error
return
; Otherwise:
SetTimer, Alert1, Off ; i.e. the timer turns itself off here.
Send, !o!n{Up}{Del} ; removed service fee
cl=
Clipboard=1111
return
}
Else
{
; DO nothing
}
cl=
Clipboard=1111
Return
Re: Clipboard1, Clipboard2?
yes , but this is only a variable 'clip' ( not the clipboard )Also, is Clip:="" the same as Clip= ??
just short , example :
variable cl1 in this case collects all clipboard contents
variable cl2 is only the last clipboard
cl1 .= clipboard . "`r`n" ; and add end of line
cl2 :=clipboard
clipboard ( this is really the clipboard )
you must check if clipboard is empty
-------------------------------------------------
if cl2 =
....
;or
if clipboard =
....
Re: Clipboard1, Clipboard2?
Thanks Gary. After thinking about this problem further. There is always data in the Clipboard for this program, there has to be for it to function correctly.garry wrote:yes , but this is only a variable 'clip' ( not the clipboard )Also, is Clip:="" the same as Clip= ??
just short , example :
variable cl1 in this case collects all clipboard contents
variable cl2 is only the last clipboard
cl1 .= clipboard . "`r`n" ; and add end of line
cl2 :=clipboard
clipboard ( this is really the clipboard )
you must check if clipboard is empty
-------------------------------------------------
if cl2 =
....
;or
if clipboard =
....
So i need to think of it as "if nothing NEW is entered into clip, then do nothing (return)"
Thanks
Re: Clipboard1, Clipboard2?
If Clipboard change....(so I would save the original value first?) then if Clip changes, continue, if the same data/Clip, return (do nothing)
Re: Clipboard1, Clipboard2?
example with OnClipboardChange
Code: Select all
#Persistent
F1=%A_Desktop%\%A_YYYY%-%A_MM%-%A_DD%.txt
clipboard=
return
OnClipboardChange:
;if (A_EventInfo<>0)
if (A_EventInfo=1)
{
C1:=clipboard
FileAppend,%C1%`r`n,%F1%
Splashimage,,b w600 h150 x100 Y400 CWsilver m9 b fs10 zh0,%C1%
sleep,900
Splashimage, off
clipboard=
}
return
Who is online
Users browsing this forum: Google [Bot] and 166 guests