I’m trying to integrate this logic into my AHK project, but it doesn’t seem to work. I might be missing something simple.
InputBox, @, Starting row number
XXX.Range("G”@).copy
YYY.Range(“A1”).paste
If @>1 then
XXX.Range("G”@).copy
YYY.Range(“A2”).paste
Else
If @>2 then
XXX.Range("G”@).copy
YYY.Range(“A3”).paste
ExitApp
If,then,else condition
Re: If,then,else condition
You'll need COM to establish the XXX and YYY (Excel guides/references for AHK have been published, you can search for those in Tutorials section), and this looks like VBA. But something to this effect would work in AHK:
Code: Select all
If (@>1) ; if @ is allowed as a variable name, never tried it, guess it could be
{
XXX.Range("G"@).copy ; may try .Range.("G" . @) where . is the concatenation operator
YYY.Range("A2").paste
}
else if (@>2)
{
XXX.Range("G"@).copy
YYY.Range("A3").paste
}
ExitApp
Re: If,then,else condition
@Exaskryz
I posted a simplified variation of the target snippet, but yes, it does utilize COM scripting. And thank you very much for the sample code. Looks like it fits the bill.
I posted a simplified variation of the target snippet, but yes, it does utilize COM scripting. And thank you very much for the sample code. Looks like it fits the bill.
Who is online
Users browsing this forum: Google [Bot] and 257 guests