Search found 57 matches
- 12 Dec 2018, 10:07
- Forum: Ask for Help (v1)
- Topic: Selecting/Prioritizing a GUI button
- Replies: 7
- Views: 1844
Re: Selecting/Prioritizing a GUI button
That worked great wolf_II. You're the best
- 12 Dec 2018, 09:43
- Forum: Ask for Help (v1)
- Topic: Selecting/Prioritizing a GUI button
- Replies: 7
- Views: 1844
Selecting/Prioritizing a GUI button
After executing this script, I still need to tab my way to the OK button. I'm trying to figure out how to prioritize the button, so that once GUI appears, all you do is hit enter on keyboard. Kind of like most windows GUI's. Gui, Add, Button, x40 y60 w80 h30 , OK Gui, Add, Button, x180 y60 w80 h30 ,...
- 12 Dec 2018, 00:43
- Forum: Ask for Help (v1)
- Topic: Count cells in Excel column containing values
- Replies: 9
- Views: 2406
Re: Count cells in Excel column containing values
First one worked, first try. Thanks again friend
- 11 Dec 2018, 10:54
- Forum: Ask for Help (v1)
- Topic: Count cells in Excel column containing values
- Replies: 9
- Views: 2406
Re: Count cells in Excel column containing values
Second one is good, but it hung up due to protected workbook.
Would you happen to know how to reference a variable or input within a Range("A1:A100")?
Example:
Gui, Add, Edit, x112 y70 w80 h20 vStartRow,
Range("A%StartRow%:A100")
Not sure how bad I botched that up
Would you happen to know how to reference a variable or input within a Range("A1:A100")?
Example:
Gui, Add, Edit, x112 y70 w80 h20 vStartRow,
Range("A%StartRow%:A100")
Not sure how bad I botched that up
- 11 Dec 2018, 10:41
- Forum: Ask for Help (v1)
- Topic: Count cells in Excel column containing values
- Replies: 9
- Views: 2406
Re: Count cells in Excel column containing values
The first one worked. TY very much awel20
- 10 Dec 2018, 17:41
- Forum: Ask for Help (v1)
- Topic: Count cells in Excel column containing values
- Replies: 9
- Views: 2406
Re: Count cells in Excel column containing values
This one also. Probably making this harder than it is
myRange = Range("M:M")
NumRows = FileFrom..Sheets(1).CountA(myRange)
loop, NumRows
{
send, ^{PgUp}
sleep, 1000
}
myRange = Range("M:M")
NumRows = FileFrom..Sheets(1).CountA(myRange)
loop, NumRows
{
send, ^{PgUp}
sleep, 1000
}
- 10 Dec 2018, 17:31
- Forum: Ask for Help (v1)
- Topic: Count cells in Excel column containing values
- Replies: 9
- Views: 2406
Re: Count cells in Excel column containing values
Tried this one too, but got skunked
CountUsed := FileFrom.WorksheetFunction.CountA(Sheets(1).Range("M:M"))
loop, % CountUsed
{
send, ^{PgUp}
sleep, 1000
}
CountUsed := FileFrom.WorksheetFunction.CountA(Sheets(1).Range("M:M"))
loop, % CountUsed
{
send, ^{PgUp}
sleep, 1000
}
- 09 Dec 2018, 23:22
- Forum: Ask for Help (v1)
- Topic: Count cells in Excel column containing values
- Replies: 9
- Views: 2406
Re: Count cells in Excel column containing values
I tried this, but it just hangs up. No errors though
And this without input reference:
Code: Select all
CountUsed := FileFrom.Sheets(1).UsedRange.Range("M:M")
loop, % CountUsed
{
send, ^{PgUp}
sleep, 1000
}
Code: Select all
loop, % FileFrom.Sheets(1).UsedRange.Range("M:M")
{
send, ^{PgUp}
sleep, 1000
}
- 08 Dec 2018, 22:46
- Forum: Ask for Help (v1)
- Topic: Count cells in Excel column containing values
- Replies: 9
- Views: 2406
Count cells in Excel column containing values
I'm trying to create a value in this loop based on counting only cells in column M that contain values (text/numeric). Basically all the used cells.
loop, %CountUsed
{
send, ^{PgUp}
sleep, 1000
}
So if 40 cells in column M have values/used cells, I want to PgUp 40 times.
loop, %CountUsed
{
send, ^{PgUp}
sleep, 1000
}
So if 40 cells in column M have values/used cells, I want to PgUp 40 times.
- 14 Mar 2018, 22:22
- Forum: Ask for Help (v1)
- Topic: Tab to Cancel button on GUI continues script with Enter key
- Replies: 9
- Views: 1919
Re: Tab to Cancel on GUI continues script
divanebaba This variation of your snippet worked well. Tabbing/pressing Enter key to Button 2 (Cancel or No), destroys and returns GUI, but with Enter key at Button 1 (OK or Yes), or pressing Enter anytime/anywhere it will generate another GUI asking to continue, or not. This way the script doesn't ...
- 14 Mar 2018, 12:34
- Forum: Ask for Help (v1)
- Topic: Tab to Cancel button on GUI continues script with Enter key
- Replies: 9
- Views: 1919
Re: Tab to Cancel on GUI continues script
Tried this but get else not recognized error Gui, Add, Text, x12 y20 w80 h30, Date Gui, Add, Edit, x112 y20 w80 h20 vDate, Gui, Add, Button, x40 y270 w80 h30 , OK Gui, Add, Button, x180 y270 w80 h30 , Cancel Gui, Show, x800 y400 h325 w300, INPUT Return ButtonCancel: GuiEscape: Gui, Destroy Return En...
- 14 Mar 2018, 09:32
- Forum: Ask for Help (v1)
- Topic: Tab to Cancel button on GUI continues script with Enter key
- Replies: 9
- Views: 1919
Re: Tab to Cancel on GUI continues script
TY, but this doesn't relate to using the enter key when tabbing over the Cancel button. This exits the entire script. AHK allows for only one Enter:: command which I have reserved to start the remaining script. The goal is to reference the enter key to cancel Gui only when tabbed over the cancel but...
- 14 Mar 2018, 07:48
- Forum: Ask for Help (v1)
- Topic: Tab to Cancel button on GUI continues script with Enter key
- Replies: 9
- Views: 1919
Re: Tab to Cancel on GUI continues script
Searched this forum into the abyss, and still can’t figure this out. Like any Windows program, I want the capability to Tab my way to Cancel button on input box and execute the cancel button by pressing Enter.
Is this not a trivial task in AHK?
Is this not a trivial task in AHK?
- 13 Mar 2018, 11:27
- Forum: Ask for Help (v1)
- Topic: Tab to Cancel button on GUI continues script with Enter key
- Replies: 9
- Views: 1919
Re: Tab to Cancel on GUI continues script
Tried this. Script still continues Gui, Add, Text, x12 y20 w80 h30, Date Gui, Add, Edit, x112 y20 w80 h20 vDate, Gui, Add, Button, x40 y270 w80 h30 , OK Gui, Add, Button, x180 y270 w80 h30 , Cancel Gui, Add, Button, x180 y270 w80 h30 gButtonCancel, Cancel Gui, Show, x800 y400 h325 w300, INPUT Return...
- 13 Mar 2018, 10:44
- Forum: Ask for Help (v1)
- Topic: Tab to Cancel button on GUI continues script with Enter key
- Replies: 9
- Views: 1919
Tab to Cancel button on GUI continues script with Enter key
Is it possible to insert a command in here, that when I tab to GUI Cancel button and press Enter, the script returns and not continue? Same way it does when pressing Esc or clicking Cancel Gui, Add, Text, x12 y20 w80 h30, Date Gui, Add, Edit, x112 y20 w80 h20 vDate, Gui, Add, Button, x40 y270 w80 h3...
- 11 Mar 2018, 23:22
- Forum: Ask for Help (v1)
- Topic: WinMinimize open/active Excel window not working
- Replies: 2
- Views: 1235
Re: WinMinimize open/active Excel window not working
This worked great. You the manjeeswg wrote: You could try:
WinMinimize, ahk_class XLMAIN
- 11 Mar 2018, 22:44
- Forum: Ask for Help (v1)
- Topic: WinMinimize open/active Excel window not working
- Replies: 2
- Views: 1235
WinMinimize open/active Excel window not working
When I run the following over an open/active/maximized Excel window, it doesn't minimize. I searched AHK and played around with WinWait, but still same problem F9:: FileToName := "MyFile" xlApp := ComObjActive("Excel.Application") FileTo_Path := A_Desktop "\" FileToName ".xlsx" FileTo := xlApp.Workb...
- 09 Mar 2018, 21:26
- Forum: Ask for Help (v1)
- Topic: Select cell/row in Excel and scroll it to top
- Replies: 6
- Views: 1391
Re: Select cell/row in Excel and scroll it to top
Also note that above you sometimes used x l App and other times use x 1 App . These different names refer to different variables. Thanks for info. You caught that x1 typo before I edited post. Not only time I screwed that up. FantasticGuru knows :) This here worked gloriously: for CurrentSheet in x...
- 09 Mar 2018, 20:22
- Forum: Ask for Help (v1)
- Topic: Select cell/row in Excel and scroll it to top
- Replies: 6
- Views: 1391
Re: Select cell/row in Excel and scroll it to top
Thanks guys. Tried this and got error ScrollRow not recognized FileToName := "MyFile" xlApp := ComObjActive("Excel.Application") FileTo_Path := A_Desktop "\" FileToName ".xlsx" FileTo := xlApp.Workbooks.Open(FileTo_Path) FileTo.Sheets(1).ScrollRow := 10 This here works: xlApp.Goto(FileTo.Range("A10"...
- 09 Mar 2018, 16:05
- Forum: Ask for Help (v1)
- Topic: Select cell/row in Excel and scroll it to top
- Replies: 6
- Views: 1391
Select cell/row in Excel and scroll it to top
Is there any way to select a cell/row and make it the first row without manually scrolling? I think VBA allows for it, but not sure if it can be COM scripted in AHK Starting point I assume would look like this: MyFile.Sheets(1).select MyFile.ActiveSheet.Cells(10,1).select Considering 10th row is the...