Search found 57 matches

by hidefguy
12 Dec 2018, 10:07
Forum: Ask For Help
Topic: Selecting/Prioritizing a GUI button
Replies: 7
Views: 1077

Re: Selecting/Prioritizing a GUI button

That worked great wolf_II. You're the best ;)
by hidefguy
12 Dec 2018, 09:43
Forum: Ask For Help
Topic: Selecting/Prioritizing a GUI button
Replies: 7
Views: 1077

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 ,...
by hidefguy
12 Dec 2018, 00:43
Forum: Ask For Help
Topic: Count cells in Excel column containing values
Replies: 9
Views: 1333

Re: Count cells in Excel column containing values

First one worked, first try. Thanks again friend :wave:
by hidefguy
11 Dec 2018, 10:54
Forum: Ask For Help
Topic: Count cells in Excel column containing values
Replies: 9
Views: 1333

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 :)
by hidefguy
11 Dec 2018, 10:41
Forum: Ask For Help
Topic: Count cells in Excel column containing values
Replies: 9
Views: 1333

Re: Count cells in Excel column containing values

The first one worked. TY very much awel20
by hidefguy
10 Dec 2018, 17:41
Forum: Ask For Help
Topic: Count cells in Excel column containing values
Replies: 9
Views: 1333

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
}
by hidefguy
10 Dec 2018, 17:31
Forum: Ask For Help
Topic: Count cells in Excel column containing values
Replies: 9
Views: 1333

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
}
by hidefguy
09 Dec 2018, 23:22
Forum: Ask For Help
Topic: Count cells in Excel column containing values
Replies: 9
Views: 1333

Re: Count cells in Excel column containing values

I tried this, but it just hangs up. No errors though

Code: Select all

CountUsed := FileFrom.Sheets(1).UsedRange.Range("M:M")

loop, % CountUsed
{
send, ^{PgUp}
sleep, 1000
}
And this without input reference:

Code: Select all

loop, % FileFrom.Sheets(1).UsedRange.Range("M:M")
{
send, ^{PgUp}
sleep, 1000
}
by hidefguy
08 Dec 2018, 22:46
Forum: Ask For Help
Topic: Count cells in Excel column containing values
Replies: 9
Views: 1333

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.
by hidefguy
14 Mar 2018, 22:22
Forum: Ask For Help
Topic: Tab to Cancel button on GUI continues script with Enter key
Replies: 9
Views: 1247

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 ...
by hidefguy
14 Mar 2018, 12:34
Forum: Ask For Help
Topic: Tab to Cancel button on GUI continues script with Enter key
Replies: 9
Views: 1247

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...
by hidefguy
14 Mar 2018, 09:32
Forum: Ask For Help
Topic: Tab to Cancel button on GUI continues script with Enter key
Replies: 9
Views: 1247

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...
by hidefguy
14 Mar 2018, 07:48
Forum: Ask For Help
Topic: Tab to Cancel button on GUI continues script with Enter key
Replies: 9
Views: 1247

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? :)
by hidefguy
13 Mar 2018, 11:27
Forum: Ask For Help
Topic: Tab to Cancel button on GUI continues script with Enter key
Replies: 9
Views: 1247

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...
by hidefguy
13 Mar 2018, 10:44
Forum: Ask For Help
Topic: Tab to Cancel button on GUI continues script with Enter key
Replies: 9
Views: 1247

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...
by hidefguy
11 Mar 2018, 23:22
Forum: Ask For Help
Topic: WinMinimize open/active Excel window not working
Replies: 2
Views: 591

Re: WinMinimize open/active Excel window not working

jeeswg wrote: You could try:
WinMinimize, ahk_class XLMAIN
This worked great. You the man :)
by hidefguy
11 Mar 2018, 22:44
Forum: Ask For Help
Topic: WinMinimize open/active Excel window not working
Replies: 2
Views: 591

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...
by hidefguy
09 Mar 2018, 21:26
Forum: Ask For Help
Topic: Select cell/row in Excel and scroll it to top
Replies: 6
Views: 907

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...
by hidefguy
09 Mar 2018, 20:22
Forum: Ask For Help
Topic: Select cell/row in Excel and scroll it to top
Replies: 6
Views: 907

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"...
by hidefguy
09 Mar 2018, 16:05
Forum: Ask For Help
Topic: Select cell/row in Excel and scroll it to top
Replies: 6
Views: 907

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...

Go to advanced search