Search found 5143 matches

by jeeswg
51 minutes ago
Forum: Ask For Help
Topic: compiled scripts versus regular scripts
Replies: 0
Views: 18

compiled scripts versus regular scripts

- With regard to tutorials and AHK v2 development, I'm interested in any differences between regular scripts and compiled scripts. - E.g. any tips re. what differences you need to be aware of when writing a script that you know is going to be compiled. Thanks. - Some differences: - A_IsCompiled is s...
by jeeswg
Today, 11:39
Forum: Ask For Help
Topic: Is there a means of validating a ControlSetText command?
Replies: 1
Views: 30

Re: Is there a means of validating a ControlSetText command?

Code: Select all

;before:
While (WinExist("Child Window") && If (bState="")) {
While,(WinExist("Child Window") && (bState<>"%cCommand%%vValue%")) {

;after:
while (WinExist("Child Window") && (bState="")) {
while (WinExist("Child Window") && (bState<>cCommand vValue)) {
Cheers.
by jeeswg
Today, 08:46
Forum: Ask For Help
Topic: iniRead UTF-8
Replies: 16
Views: 212

Re: iniRead UTF-8

- Here is some code that works out how many bytes each Unicode character requires in each system. - It appears that for characters above 65535 in both UTF-8 and UTF-16, 4 bytes are required. - @SOTE: The point I made was that if you want to store Latin-based text, using UTF-8 will generally take up ...
by jeeswg
Yesterday, 17:34
Forum: AutoHotkey v2 Development
Topic: Operators vs Methods
Replies: 35
Views: 450

Re: Operators vs Methods

@iseahound: If higher level concepts have influenced your AutoHotkey v2 Development ideas, what about lower level concepts? Assembly language etc. Cheers.
by jeeswg
Yesterday, 12:45
Forum: Ask For Help
Topic: WinActivate / WinWaitActive don't work Topic is solved
Replies: 3
Views: 45

Re: WinActivate / WinWaitActive don't work Topic is solved

Code: Select all

;these work:
WinActivate, % "ahk_exe notepad.exe"
WinWaitActive, % "ahk_exe notepad.exe",, 5

;these work also:
WinActivate, ahk_exe notepad.exe
WinWaitActive, ahk_exe notepad.exe,, 5
Cheers.
by jeeswg
Yesterday, 12:35
Forum: Ask For Help
Topic: Is ^!7 a valid hotkey?
Replies: 3
Views: 56

Re: Is ^!7 a valid hotkey?

Continuing on from what eelrod said:

Code: Select all

^!7::
^!Numpad7:: ;works when NumLock is on
^!NumpadHome:: ;works when NumLock is off
MsgBox, % A_ThisHotkey
return
by jeeswg
Yesterday, 12:11
Forum: Ask For Help
Topic: Send text to non-focus Notepad in one chunk
Replies: 6
Views: 45

Re: Send text to non-focus Notepad in one chunk

- Consider using EditPaste, it will immediately insert text into Notepad. Although, note: when you use EditPaste, just like when you send key presses, if any text is selected, it will be overwritten.
- EditPaste works on Edit controls.

Code: Select all

q::
Control, EditPaste, abc, Edit1, A
return
by jeeswg
17 Oct 2018, 20:22
Forum: Ask For Help
Topic: Set Highlight of selected text
Replies: 1
Views: 34

Re: Set Highlight of selected text

For highlighting, something like this: F10:: ComObjActive("Word.Application").Selection.Range.HighlightColorIndex := 2 F11:: ComObjActive("Word.Application").Selection.Range.HighlightColorIndex := 3 F12:: ComObjActive("Word.Application").Selection.Range.HighlightColorIndex := 4 Possibly, to turn off...
by jeeswg
17 Oct 2018, 18:44
Forum: Ask For Help
Topic: convert bytes to shorts (by converting ANSI to Unicode)
Replies: 0
Views: 33

convert bytes to shorts (by converting ANSI to Unicode)

- I'm interested in converting bytes to shorts. I.e. each byte becomes 2 bytes, e.g. 'AA' becomes 'AA00', you double the amount of data. - I have found that MultiByteToWideChar can do this (demonstrated below), I wondered if there were any other well-known ways. (That is my 'Ask For Help' question.)...
by jeeswg
17 Oct 2018, 13:56
Forum: Ask For Help
Topic: How to determine if Word is open?
Replies: 1
Views: 32

Re: How to determine if Word is open?

- Two ideas are:
- if WinExist("ahk_class OpusApp") ;MS Word
- A try/catch block:
Try - Syntax & Usage | AutoHotkey
https://autohotkey.com/docs/commands/Try.htm
by jeeswg
17 Oct 2018, 13:12
Forum: Ask For Help
Topic: Extending array/object functionality?
Replies: 1
Views: 41

Re: Extending array/object functionality?

Perhaps you could write your own StrSplit function, using a parsing a loop to parse the text, and a custom class with the extended functionality.
by jeeswg
17 Oct 2018, 05:02
Forum: Ask For Help
Topic: Find open Chrome tabs and waiting for page loading Topic is solved
Replies: 3
Views: 73

Re: Find open Chrome tabs and waiting for page loading Topic is solved

I have these functions, but they can only handle tab names, not urls. Firefox/Chrome, get tab names/focus tab - AutoHotkey Community https://autohotkey.com/boards/viewtopic.php?f=6&t=26947 These links may be helpful: [Library] Chrome.ahk - Automate Google Chrome using native AutoHotkey. No Selenium!...
by jeeswg
17 Oct 2018, 04:59
Forum: Ask For Help
Topic: Hotkey scope limitation
Replies: 4
Views: 50

Re: Hotkey scope limitation

Use AHK's window spy to check the class. On Publisher 2007 it's MSWinPub.
by jeeswg
17 Oct 2018, 04:19
Forum: Ask For Help
Topic: Get working directory of a window's process?
Replies: 1
Views: 35

Re: Get working directory of a window's process?

- There's this script: [SOLVED]get other process's working dir - Page 3 - Ask for Help - AutoHotkey Community https://autohotkey.com/board/topic/85304-solvedget-other-processs-working-dir/page-3#entry544650 - You can use regular AutoHotkey v1.1, however, you need a 32-bit/64-bit dll (see the link be...
by jeeswg
16 Oct 2018, 22:40
Forum: Ask For Help
Topic: Illegal character error with Run command
Replies: 5
Views: 76

Re: Illegal character error with Run command

Try a backtick before the % for a literal %: `%
Otherwise it sees the start of a variable e.g. %var%
by jeeswg
16 Oct 2018, 22:19
Forum: Ask For Help
Topic: Copy Text via DllCall Topic is solved
Replies: 2
Views: 43

Re: Copy Text via DllCall Topic is solved

- I have this function, however, I don't think the approach would quite work. The text belongs to an external process and so you need the external process to put that text onto the clipboard. The external process needs to have a 'clipboard set text' function of some kind, not your script. And normal...
by jeeswg
16 Oct 2018, 21:29
Forum: Scripts and Functions
Topic: BaseToDec / DecToBase
Replies: 0
Views: 46

BaseToDec / DecToBase

- Here are 2 prototype functions for converting between bases. - I've added in some functionality to help support large bases (i.e. beyond base 36), custom single/multiple character digit strings (instead of 0-9 A-Z), and delimiter-separated numbers (as is typical for sexagesimal i.e. base 60). - I'...
by jeeswg
16 Oct 2018, 19:18
Forum: Ask For Help
Topic: ControlSend pressing Shift during send?
Replies: 3
Views: 57

Re: ControlSend pressing Shift during send?

Try:
ControlSend ,, % "{Text}" val, ahk_exe cmd.exe
by jeeswg
16 Oct 2018, 17:43
Forum: AutoHotkey v2 Development
Topic: <> no longer acceptable as a comparison operator
Replies: 48
Views: 1333

Re: <> no longer acceptable as a comparison operator

I came across this post completely coincidentally, the second result when you type 'AutoIt operators' into Google. Does AutoIT have != or NOTEQUAL logical operator - AutoIt General Help and Support - AutoIt Forums https://www.autoitscript.com/forum/topic/135282-does-autoit-have-or-notequal-logical-o...

Go to advanced search