Search found 3555 matches

by jeeswg
09 Feb 2018, 14:41
Forum: Ask For Help
Topic: Starting a new project, but with which AHK version?
Replies: 7
Views: 130

Re: Starting a new project, but with which AHK version?

- If the project uses a lot of GUIs, then AHK v2 might be better. - If using AHK v1.1, I would use the more future compatible AHK v1.1 functions e.g. not SetFormat/StringReplace/StringSplit, but instead Format/StrReplace/StrSplit. Those are the main commands that are fiddly to convert or require man...
by jeeswg
08 Feb 2018, 05:16
Forum: Ask For Help
Topic: traditional-if and operators
Replies: 5
Views: 108

Re: traditional-if and operators

Thank you just me. So the documentation did contain the information after all, 6 IfXXX control flow statements, and 7 operator equivalents, and == is not one of them.
by jeeswg
08 Feb 2018, 03:26
Forum: Ask For Help
Topic: traditional-if and operators
Replies: 5
Views: 108

Re: traditional-if and operators

Thanks. So I suppose if var1 == %var2% is equivalent to if (var1 = "= " var2) . q:: var1 := "= text" var2 := "text" if var1 == %var2% MsgBox, % 1 else MsgBox, % 0 ;=============== var1 := "= text" var2 := "= text" if var1 = %var2% MsgBox, % 1...
by jeeswg
07 Feb 2018, 18:13
Forum: Ask For Help
Topic: traditional-if and operators
Replies: 5
Views: 108

traditional-if and operators

- I'm working on a script converter. I don't personally use traditional lines like if var1 = %var2% , I use expression lines like if (var1 = var2) , which are more intuitive. However, I want my converter to be able to handle traditional lines. - I couldn't find clear details on, for example,...
by jeeswg
07 Feb 2018, 10:35
Forum: Ask For Help
Topic: SHFileOperation -> IFileOperation conversion?
Replies: 6
Views: 278

Re: SHFileOperation -> IFileOperation conversion?

- How much evidence do you have that AutoIt is progressing faster? I don't have any information on this. (Maybe sometimes AutoIt people think, I wish we had that AutoHotkey feature/script.) Personally, AutoHotkey has all the functionality I need, it's just a question of completing my projects. - We ...
by jeeswg
07 Feb 2018, 10:06
Forum: Scripts and Functions
Topic: StrUnused prototype function: find unused characters for use as delimiters/separators
Replies: 11
Views: 300

Re: StrUnused prototype function: find unused characters for use as delimiters/separators

- @Cerberus: Hmm, 'practically unique', but not *unique*. I did use 'qqq' for some things in Excel, before I used AutoHotkey, I can't remember the exact logical issues of when using such a string is safe or not. - If you replace text, with the new text being shorter than or the same length as the ne...
by jeeswg
07 Feb 2018, 08:01
Forum: Ask For Help
Topic: notation: objects: key names to avoid clashes with methods/properties
Replies: 17
Views: 280

Re: notation: objects: key names to avoid clashes with methods/properties

- Thanks. It turns out I have that quote here already. The link also mentions two conflicting quotes re. what a meta-function is. object classes: redefine __Set() temporarily / general queries - AutoHotkey Community https://autohotkey.com/boards/viewtopic.php?f=5&t=42674&p=193868#p193868 - A...
by jeeswg
06 Feb 2018, 21:27
Forum: Ask For Help
Topic: unexpected return values using StrReplace as a BoundFunc object
Replies: 3
Views: 99

Re: unexpected return values using StrReplace as a BoundFunc object

- It looks bug-like. I got the same results, although different unexpected characters. By putting in a go-between function, I didn't get any errors. (The correct result is 'Haystack', the string should remain unchanged as it does not contain 'z'.) q:: ;test bound funcs with built-in functions MsgBox...
by jeeswg
06 Feb 2018, 17:20
Forum: Ask For Help
Topic: Random "bugs" in Autohotkey? Topic is solved
Replies: 43
Views: 832

Re: Random "bugs" in Autohotkey? Topic is solved

- Re. LControl/Control, I don't honestly know, but it's a good question. If that changes the state of one key and not two, perhaps it's fractionally less costly. - You could try using ControlGetFocus and ControlSend, this may or may not have any advantage. - This worked in Firefox, in case it's usef...
by jeeswg
06 Feb 2018, 14:14
Forum: Ask For Help
Topic: object classes: redefine __Set() temporarily / general queries
Replies: 69
Views: 1420

Re: object classes: redefine __Set() temporarily / general queries

- In a switch statement, you lookup a value and get a result (which no doubt you know), a bit like if/else if/else, or the ternary operator. The question is: what to return when your lookup value isn't found in the list. - I'm trying to do that via an object, but I wanted to set the else condition, ...
by jeeswg
06 Feb 2018, 14:07
Forum: Ask For Help
Topic: ActiveCell Offset error
Replies: 14
Views: 245

Re: ActiveCell Offset error

AFAIK, usually, if something is a property (get/set information), no parentheses are used, and if something is a method (perform an action), parentheses are used. Anyhow, I believe that that's how it works with standard AHK arrays. It seems that sometimes with Excel, certain methods work even if you...
by jeeswg
06 Feb 2018, 13:10
Forum: Ask For Help
Topic: object classes: redefine __Set() temporarily / general queries
Replies: 69
Views: 1420

Re: object classes: redefine __Set() temporarily / general queries

- Thanks. If __Init() is undocumented, then __Init.Call() is *even more* undocumented. And as you say, none of this should be relied upon, although it's great for understanding. - I was working on an example for a switch statement via objects. I mention this in case it can be simplified in any way. ...
by jeeswg
06 Feb 2018, 12:19
Forum: Ask For Help
Topic: Clipboard and if commands
Replies: 7
Views: 57

Re: Clipboard and if commands

Excel appends a CRLF when you copy text, two workarounds: vText := RTrim(vText, "`r`n") vText := SubStr(vText, 1, -2) Btw I would avoid using the Clipboard variable repeatedly as this means AHK has to keep retrieving the clipboard contents, instead I would create a temporar...
by jeeswg
06 Feb 2018, 12:13
Forum: Ask For Help
Topic: Random "bugs" in Autohotkey? Topic is solved
Replies: 43
Views: 832

Re: Random "bugs" in Autohotkey? Topic is solved

- Hopefully this script solves both problems. It uses {LCtrl Up} to avoid the modifier key issue, and it uses {Text} to solve the send keys issue (note: {Text} requires AHK v1.1.27+). ^u:: Clipboard := "" Send {LCtrl Up}^x ClipWait StringUpper, Clipboard, Clipboard ; Convert text to upper ...
by jeeswg
06 Feb 2018, 12:03
Forum: Ask For Help
Topic: Athletic Case Format
Replies: 5
Views: 72

Re: Athletic Case Format

- I've done a little script. My solution for the 'McMacGregor' question is currently 'McMACGREGOR'. Another question would be ''deMacGregor', my solution is currently 'DeMACGREGOR'. - If the original text is upper/title/lower case, it gets converted to upper case. If the original text is special cas...
by jeeswg
06 Feb 2018, 11:43
Forum: Ask For Help
Topic: ActiveCell Offset error
Replies: 14
Views: 245

Re: ActiveCell Offset error

- @FanaticGuru, thinks very much for the info. re. ActiveCell only applying to the active sheet, I believe this applies to Selection also. Although it appears that you *can* use Select without having to activate the sheet first. This had been causing me unexplained error messages. - I couldn't find ...
by jeeswg
06 Feb 2018, 09:55
Forum: Ask For Help
Topic: objects: enumerator object queries
Replies: 7
Views: 133

Re: objects: enumerator object queries

- Thanks. I usually see custom enumerators make use of linear arrays. If you wanted to use a custom enumerator on an associative array, it seems that you would have to use a standard enumerator at some point to retrieve those keys in order. Either, before you pass the object to the custom enumerator...
by jeeswg
06 Feb 2018, 09:42
Forum: Ask For Help
Topic: object classes: redefine __Set() temporarily / general queries
Replies: 69
Views: 1420

Re: object classes: redefine __Set() temporarily / general queries

- Cheers Helgef. So I suppose that you inferred that a func object may have been used, and tested that, and that you were quite pleased when it worked.
- You've been a busy bee, thanks so much for contributing to several of my object posts today.
by jeeswg
05 Feb 2018, 09:51
Forum: Ask For Help
Topic: Alternative to CTRL V
Replies: 16
Views: 170

Re: Alternative to CTRL V

- I just remembered that I started a list of similar-looking characters that can cause confusion, here: jeeswg's characters tutorial - AutoHotkey Community https://autohotkey.com/boards/viewtopic.php?f=7&t=26486 - I suppose in my post above, it may not have been obvious that the characters were ...
by jeeswg
04 Feb 2018, 22:48
Forum: Ask For Help
Topic: Adobe Acrobat Reader
Replies: 1
Views: 42

Re: Adobe Acrobat Reader

- Almost there. This works for me: #IfWinActive, ahk_class AcrobatSDIWindow ;toggle vertical auto-scroll on/off RControl::^+h return #IfWinActive - Hotkeys are affected, not by the IfWinActive command, but by the #IfWinActive directive. You need the #. Without the #, the hotkey would be triggered fo...

Go to advanced search