I need help with list making program/macro!

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
imkasper
Posts: 1
Joined: 20 Apr 2021, 06:29

I need help with list making program/macro!

Post by imkasper » 20 Apr 2021, 06:53

Hello,
I made a program which copies one cell from excel, switching tabs and paste it into another program, sadly because of my computer it is sometimes laggy and some positions are not being copied, tried it with clipwait but still no result. Another problem is that when in excel I have duplicate of the same position the program is getting stuck because it has to click ok(only when it paste the duplicate which is already on the list)

Here is a script:

Code: Select all

Gui, Add, text, , Enter #:
Gui, Add, Edit, vNum
Gui, Add, Button, default, OK
Gui, Show
Return

GuiClose:
ButtonOK:
Gui, Submit 

#o::
Loop, %Num%
{

Send ^c
ClipWait
Send, {Alt Down}
Sleep 100
Send, !{Tab}
Sleep, 100
Send, {Alt Up}
Sleep, 100
Send ^v
Sleep, 200
Send `t
Sleep, 100
Send {ENTER}
Sleep, 100
Send {SHIFT DOWN}{TAB DOWN}{TAB UP}{SHIFT UP}
Sleep, 500
Send, {Alt Down}
Sleep 100
Send, !{Tab}
Sleep, 100
Send, {Alt Up}
Sleep, 100
Send, {Down}

}

ExitApp

#p::Pause

Example excel positions:

111125
255453
54584
5114514
51431
5143548
4584
8431
4831
4586
18564
4583


Generally speaking I want to open program and have gui that I can paste multiple vertical positions from excel and after clicking ok it will save it to memory, then when I click a button(for example:#o) the program will start looping code below for all the positions so if there would be 6 positions it would paste all of them individually. And if there would be duplicated position I would want program to paste it only once and give me a message after finishing job that "this" position was duplicated x times and was pasted only once.

Code: Select all

Send ^v
Sleep, 200
Send `t
Sleep, 100
Send {ENTER}
Sleep, 100
Send {SHIFT DOWN}{TAB DOWN}{TAB UP}{SHIFT UP}
User avatar
SKAN
Posts: 1551
Joined: 29 Sep 2013, 16:58

Re: I need help with list making program/macro!

Post by SKAN » 24 Jun 2021, 08:47

Moved from Scripts & Functions


Last bumped by imkasper on 24 Jun 2021, 08:47.
Post Reply

Return to “Ask for Help (v1)”