Search found 4783 matches

by jeeswg
14 Aug 2018, 19:40
Forum: AutoHotkey v2 Development
Topic: NumOp/StrOp (with respect to !=/!==)
Replies: 39
Views: 542

Re: NumOp/StrOp (with respect to !=/!==)

- @Helgef: I had thought that 'stricter' type handling for expressions might have some advantages, as well as some disadvantages. - Looking at the drip feed of GitHub pull requests, I now see further disadvantages, which may (or may not) be soluble if discussed properly. - I think this topic needs r...
by jeeswg
14 Aug 2018, 15:40
Forum: AutoHotkey v2 Development
Topic: [Feature Request] Add "Sign" function
Replies: 2
Views: 78

Re: [Feature Request] Add "Sign" function

- I know it's relatively minor but I would agree that this should be added. - There's a certain selection of basic functions that should be built into all programming languages and I have been writing an article on this that I intend to publish, comparing 4 programming languages. - I would want Auto...
by jeeswg
14 Aug 2018, 15:29
Forum: Wish List
Topic: StrReplace() should have option to replace from rear of string
Replies: 12
Views: 401

Re: StrReplace() should have option to replace from rear of string

- @User: I think your ideas are fine, it's just that I tend to suggest things in line with what currently exists. Something very conservative that hopefully wouldn't shock anyone. - I wouldn't start a new syntax convention just for one function. - You could start a thread in Wish List stating that y...
by jeeswg
14 Aug 2018, 08:59
Forum: Ask For Help
Topic: Hotstrings using final sigma (Greek alphabet)
Replies: 2
Views: 36

Re: Hotstrings using final sigma (Greek alphabet)

You could use the Hotstring function. I've provided 2 examples, one with Greek letters, one with Latin (i.e. English) letters. ;q:: ;word with diacritics to word without diacritics (plus trailing middle-sigma to final-sigma) vList := " ( γλαῦκος )" Loop, Parse, vList, `n, `r { vTemp := A_L...
by jeeswg
13 Aug 2018, 22:44
Forum: Wish List
Topic: StrReplace() should have option to replace from rear of string
Replies: 12
Views: 401

Re: StrReplace() should have option to replace from rear of string

- Thanks User. - An alternative would be a space-separated list. I mentioned that alternative earlier. - However, I find RegExReplace very workable, and StrReplace would only have one more parameter than that. - People could use mnemonics like so: vRet := StrReplace("ABCabc", "a&q...
by jeeswg
13 Aug 2018, 21:53
Forum: Ask For Help
Topic: String clean up. remove starting empty space
Replies: 11
Views: 65

Re: String clean up. remove starting empty space

- Btw I intended for only one of these lines to be used, I would suggest the 2nd one: vText2 := Trim(vText2, "`n `t") ;trim LFs and spaces/tabs vText2 := Trim(vText2, "`r`n `t") ;trim CRs/LFs and spaces/tabs - You need to remove the space just after %mainContents%. Btw if you use...
by jeeswg
13 Aug 2018, 21:21
Forum: Ask For Help
Topic: String clean up. remove starting empty space
Replies: 11
Views: 65

Re: String clean up. remove starting empty space

- Perhaps one of these two: vText := Trim(vText, "`n `t") ;trim LFs and spaces/tabs vText := Trim(vText, "`r`n `t") ;trim CRs/LFs and spaces/tabs - Chr(10) is linefeed (LF), which is also `n in AutoHotkey. - Chr(13) is carriage return (CR), which is also `r in AutoHotkey. - CRLF ...
by jeeswg
13 Aug 2018, 20:13
Forum: Ask For Help
Topic: String clean up. remove starting empty space
Replies: 11
Views: 65

Re: String clean up. remove starting empty space

- If you'd copied and pasted your text into the post, I could have checked it. - StringTrimLeft/StringTrimRight are deprecated. They crop a specific number of characters, but SubStr can be used instead. - Trim/LTrim/RTrim crop a variable number of characters, based on a list of characters. - Try: Tr...
by jeeswg
13 Aug 2018, 20:02
Forum: Ask For Help
Topic: String clean up. remove starting empty space
Replies: 11
Views: 65

Re: String clean up. remove starting empty space

- Try this: vText := " text " MsgBox, % "[" Trim(vText) "]" MsgBox, % "[" LTrim(vText) "]" MsgBox, % "[" RTrim(vText) "]" - By default Trim/LTrim/RTrim removes leading/trailing spaces and tabs. You can specify a list of characters.
by jeeswg
13 Aug 2018, 19:46
Forum: Wish List
Topic: StrReplace() should have option to replace from rear of string
Replies: 12
Views: 401

Re: StrReplace() should have option to replace from rear of string

- Thanks for your comments. - Yes there would be a lot of parameters. But I believe that on balance the alternatives are more unwieldy, with a lot of lines. - With case sensitivity, a further disadvantage is that you must remember to do StringCaseSense, % vSCS to restore the mode before any returns ...
by jeeswg
13 Aug 2018, 16:21
Forum: Ask For Help
Topic: v1/v2 Random for both
Replies: 16
Views: 207

Re: v1/v2 Random for both

- So eval is insufficient? eval (using JS/COM) - AutoHotkey Community https://autohotkey.com/boards/viewtopic.php?f=6&t=15389 - If you wanted a change to AHK as a long-term solution, perhaps you would consider using a command dynamically for AHK v1 and v2. - Is any function as tough to recreate ...
by jeeswg
13 Aug 2018, 14:09
Forum: AutoHotkey v2 Development
Topic: NumOp/StrOp (with respect to !=/!==)
Replies: 39
Views: 542

NumOp/StrOp (with respect to !=/!==)

- I've noticed a lot of suggestions here re. changing string/number handling. Pull Requests · Lexikos/AutoHotkey_L · GitHub https://github.com/Lexikos/AutoHotkey_L/pulls - I welcome the != change, as now (var1 != var2) and !(var = var2) are consistent. However, one side effect is that !(var1 != var2...
by jeeswg
13 Aug 2018, 10:59
Forum: Wish List
Topic: A_MajorAHKVersion
Replies: 5
Views: 66

Re: A_MajorAHKVersion

- @Helgef: Good point that #Include might change in future. - For me the larger point is this. People just want to be able write AHK v1 code that they know will also work in AHK v2. And such people are willing to make many efforts to shape their AHK v1 code to make it possible. - If that means an '#...
by jeeswg
13 Aug 2018, 10:42
Forum: Ask For Help
Topic: How do I use GroupAdd for two seperate applications having same ahk_class name Topic is solved
Replies: 4
Views: 65

Re: How do I use GroupAdd for two seperate applications having same ahk_class name Topic is solved

I would probably not use GroupAdd for this, and instead, at the appropriate places: ;not: the OWL.DocumentWindow line would have to appear above the more generic line #IfWinActive, ahk_class OWL.DocumentWindow ahk_exe Illustrator.exe #IfWinActive, ahk_exe Illustrator.exe #IfWinActive, ahk_class OWL....
by jeeswg
13 Aug 2018, 10:37
Forum: Wish List
Topic: A_MajorAHKVersion
Replies: 5
Views: 66

Re: A_MajorAHKVersion

- Some ideas: - A_AhkVersionMajor. - Add the ability to do a conditional #Include. - Perhaps this is better, as being forced to #Include files is generally very undesirable, versus keeping everything within one file which is preferable: an equivalent to C++'s #if #else #endif - AutoHotkey Community ...
by jeeswg
12 Aug 2018, 18:25
Forum: Gaming
Topic: Question about RegEx-basics?
Replies: 2
Views: 37

Re: Question about RegEx-basics?

- Try this: ;before: FoundPos := RegExMatch (Line, "i)you cast your spell*") ;after (remove the space): FoundPos := RegExMatch(Line, "i)you cast your spell*") - I wrote this, I may think of further improvements to the 'quick tutorial' in the future. jeeswg's RegEx tutorial (RegEx...
by jeeswg
12 Aug 2018, 17:00
Forum: Ask For Help
Topic: Edit a file through Full Path, as contained in the Clipboard
Replies: 2
Views: 32

Re: Edit a file through Full Path, as contained in the Clipboard

Try this:

Code: [Select all]GeSHi © Codebox Plus

+#i::  ; Note, this is a failed attempt
clipback := Clipboard
MsgBox, %clipback%
ShellRun("C:\vim\vim80\gvim.exe", clipback, "", 3)
; run "C:\vim\vim80\gvim.exe" %clipback%
return
by jeeswg
12 Aug 2018, 02:12
Forum: Wish List
Topic: StrReplace() should have option to replace from rear of string
Replies: 12
Views: 401

Re: StrReplace() should have option to replace from rear of string

- I noticed that this was raised on GitHub: Adding CaseSensitive parameter to StrReplace. by HelgeffegleH · Pull Request #103 · Lexikos/AutoHotkey_L · GitHub https://github.com/Lexikos/AutoHotkey_L/pull/103 - I would suggest the following: ;before: ReplacedStr := StrReplace(Haystack, SearchText [, R...
by jeeswg
11 Aug 2018, 12:49
Forum: Offtopic
Topic: UI Automation v. Acc (MSAA: Microsoft Active Accessibility)
Replies: 6
Views: 178

Re: UI Automation v. Acc (MSAA: Microsoft Active Accessibility)

- @jethrow: Thanks for the info. - Nice to see you on the forums again, it's a pleasure to have you on one of my threads. - Thanks so much for AccViewer, iWB2 Learner, WBGet, and your COM examples thread, 4 threads that spring to mind. - I have added a 'by jethrow' list, here: best utilities + best ...
by jeeswg
10 Aug 2018, 18:59
Forum: Ask For Help
Topic: SAPI parameters, rate, volume and async speech?
Replies: 11
Views: 677

Re: SAPI parameters, rate, volume and async speech?

- I don't have any hard facts. My expectations would be the same as yours, first index is 0, last index is n-1, where the number of voices available = n.
- You can use checks and error messages to handle unexpected results. E.g. try/catch, and .GetAttribute("Name").

Go to advanced search