Search found 4117 matches

by jeeswg
Today, 07:47
Forum: Ask For Help
Topic: How can I fix sending keys problem after activating ie browser?
Replies: 4
Views: 35

Re: How can I fix sending keys problem after activating ie browser?

- Use WinActivate, ahk_class IEFrame.
- SendKeys!? Use SendInput, or ControlSend if you can get it to work. Send keys in order to achieve what?
by jeeswg
Today, 06:58
Forum: Ask For Help
Topic: Best way to check if process and win exists in one line
Replies: 7
Views: 89

Re: Best way to check if process and win exists in one line

Here's some example code. q:: ;check if IE window exists pwb := ComObjCreate("InternetExplorer.Application") pwb.Visible := 0 ;False hWnd := pwb.HWND DetectHiddenWindows, On MsgBox, % WinExist("ahk_id " hWnd) DetectHiddenWindows, Off ;pwb.Visible := -1 ;True pwb.Quit() pwb := &qu...
by jeeswg
Today, 06:47
Forum: Ask For Help
Topic: Reading Raw Data From Binary File
Replies: 4
Views: 52

Re: Reading Raw Data From Binary File

- I meant to add after 'Why are you using DllCall with CreateFile?': AFAICS it doesn't actually do anything. - I'm not sure what the significance of '8-bit system' is. Are you using an old Windows OS? I would have thought that if you wanted to read the first 3 bytes of a file, you would just read th...
by jeeswg
Today, 06:36
Forum: Ask For Help
Topic: How can I fix sending keys problem after activating ie browser?
Replies: 4
Views: 35

Re: How can I fix sending keys problem after activating ie browser?

- Try this: #IfWinActive, ahk_class IEFrame ;internet explorer $!n:: ;internet explorer - focus notification bar ControlFocus, Internet Explorer_Server1, A SendInput, !n return #IfWinActive - I've found this issue most annoying. In normal use, if the notification bar appears, and you press alt+n, it...
by jeeswg
Today, 05:20
Forum: Ask For Help
Topic: Reading Raw Data From Binary File
Replies: 4
Views: 52

Re: Reading Raw Data From Binary File

- Here's an example: q:: ;read/write binary files ;create file vPath := A_Desktop "\z bin " A_Now ".bin" if !(oFile := FileOpen(vPath, "w")) ;empties file return vList := "98 C3 78" Loop, Parse, vList, % " " oFile.WriteUChar("0x" A_LoopFiel...
by jeeswg
Today, 02:51
Forum: Ask For Help
Topic: objects/object classes: new features from a newbie-friendly perspective
Replies: 1
Views: 175

Re: objects/object classes: new features from a newbie-friendly perspective

AUTOHOTKEY OBJECT IDEAS INTRODUCTION - Some of the fundamentals of AHK objects appear to be under review. - In this thread, some subtle but major improvements were made to AHK objects: Test build - Obj.Count(), OnError(), long paths, experimental switch-case - AutoHotkey Community https://autohotkey...
by jeeswg
Today, 01:41
Forum: Ask For Help
Topic: Best way to check if process and win exists in one line
Replies: 7
Views: 89

Re: Best way to check if process and win exists in one line

I hid Internet Explorer, but still found a window with class 'Alternate Owner'. I set SetTitleMatchMode to RegEx, to make it look for a window that had a window title of at least one character, and then it didn't find any windows. q:: DetectHiddenWindows, Off MsgBox, % hWnd := WinExist("ahk_exe...
by jeeswg
Yesterday, 13:23
Forum: Ask For Help
Topic: Winget PROCESSNAME and case
Replies: 4
Views: 78

Re: Winget PROCESSNAME and case

- Actually, one principle of programming is to do the minimum of work. So it might be better to get the path with what might be the incorrect case, and fix it afterwards if desired. (As I demonstrated, A_LoopFileLongPath can fix the case.) - Another important principle is good documentation. It shou...
by jeeswg
Yesterday, 08:50
Forum: Offtopic
Topic: AutoHotkey: the album
Replies: 3
Views: 98

Re: AutoHotkey: the album

- Hey that's a good one, I'll add it to the list.
- Also, I meant to add one (well, a pair) earlier today, I'll just *amend* my list.
by jeeswg
Yesterday, 05:48
Forum: AutoHotkey v2 Development
Topic: long path support
Replies: 8
Views: 176

Re: long path support

- The file loop is working if the \\?\ prefix is used [in both test builds: 1.1.28.02-7+ga1186b3 and 1.1.28.02-10+g1a41623], curiously, some but not all long paths are retrieved if you omit it (which is what confused me). Also, the list you get with \\?\ omitted is slightly different to the one you ...
by jeeswg
Yesterday, 03:09
Forum: AutoHotkey v2 Development
Topic: long path support
Replies: 8
Views: 176

Re: long path support

- Thanks so much lexikos. I'll clear up my earlier posts at some point, now that I know about this issue. It's just the question of folder recursion left. - Oh dear, with a maximum component length of 255, there's virtually no benefit in having long paths. (Although I notice it says 'commonly'.) - N...
by jeeswg
Yesterday, 01:26
Forum: AutoHotkey v2 Development
Topic: long path support
Replies: 8
Views: 176

Re: long path support

- Based on my tests, there may actually be some issues with the file loop at present. Maybe your OSes, or your settings don't cause the problems. I'm using Windows 7. - Re. the first quote. I tried a basic file loop, and it seems that it is recursing into some long-path folders, but not all of them,...
by jeeswg
Yesterday, 00:06
Forum: Ask For Help
Topic: How to get current time of the day in seconds? Topic is solved
Replies: 3
Views: 52

Re: How to get current time of the day in seconds? Topic is solved

Here are two examples. q:: ;time at 00:10 AM (seconds) vDate := SubStr(A_Now, 1, 8) "001000" FormatTime, vDate, % vDate, HH:mm:ss oTemp := StrSplit(vDate, ":") vSec := oTemp.1*3600+oTemp.2*60+oTemp.3 MsgBox, % vSec return w:: ;time now (seconds) FormatTime, vDate,, HH:mm:ss oTemp...
by jeeswg
21 Apr 2018, 15:50
Forum: Ask For Help
Topic: 2d array returning blank Topic is solved
Replies: 8
Views: 118

Re: 2d array returning blank Topic is solved

It's generally long-winded when you assign it, but simple when you retrieve it.

Code: [Select all]GeSHi © Codebox Plus

q::
Box := []
Box[1, "material"] := "cardboard"
Box[2, "material"] := "wood"
MsgBox, % Box.2.material
return
by jeeswg
21 Apr 2018, 09:57
Forum: Ask For Help
Topic: 2d array returning blank Topic is solved
Replies: 8
Views: 118

Re: 2d array returning blank Topic is solved

- I have a section called: A KEY CAN HAVE A VALUE OR CHILD KEYS, BUT NOT BOTH, here: jeeswg's objects tutorial - AutoHotkey Community https://autohotkey.com/boards/viewtopic.php?f=7&t=29232 - I would think that a normal person would not expect this behaviour. - However, if obj.key could have bot...
by jeeswg
21 Apr 2018, 09:46
Forum: AutoHotkey v2 Development
Topic: Functions | &ByRef • ByVal
Replies: 14
Views: 256

Re: Functions | &ByRef • ByVal

- Do you not have functions that operate directly upon ByVal parameter variables? If parameters were ByRef by default, those functions would be broken. - Perhaps AllByRef MyFunc() or AssumeByRef MyFunc() . - Is having a shorter way of writing 'ByRef' so useful? Please show me an exam...
by jeeswg
21 Apr 2018, 09:06
Forum: Scripts and Functions
Topic: file get part (SplitPath alternative/short-form/long-form/correct case)
Replies: 1
Views: 62

file get part (SplitPath alternative/short-form/long-form/correct case)

This function combines various file path functionality I wanted: - SplitPath alternative that directly returns one part of the path q:: ;get file part / convert file path vPath := "C:\A\B\C\D\E\NameNoExt.Ext" vPath := A_AhkPath vPath := A_ScriptFullPath vPath := Format("{:U}", vP...
by jeeswg
21 Apr 2018, 08:28
Forum: Ask For Help
Topic: Adobe Acrobat DC, Shortcut to change highlight color
Replies: 5
Views: 77

Re: Adobe Acrobat DC, Shortcut to change highlight color

Perhaps try:

Code: [Select all]GeSHi © Codebox Plus

SendInput, {Shift Up}+{F10}
;or:
SendInput, {Shift Up}{Shift Down}{F10}{Shift Up}
by jeeswg
21 Apr 2018, 08:25
Forum: AutoHotkey v2 Development
Topic: For-loops | Range object
Replies: 8
Views: 160

Re: For-loops | Range object

Range object. Sounds good. (I'm wondering if any other functions for generating objects would be useful.)
by jeeswg
21 Apr 2018, 08:22
Forum: AutoHotkey v2 Development
Topic: Functions | &ByRef • ByVal
Replies: 14
Views: 256

Re: Functions | &ByRef • ByVal

- One idea could be: ByRef MyFunc() to make all parameters ByRef. - To make ByRef the default. It's a bit of a paradigm shift, it might be a good idea. If I could just stick 'ByRef' on at the front of every function (cf. 'class'), that would make it easy to fix my existing functions. - How m...

Go to advanced search