Search found 1123 matches

by rommmcek
27 Nov 2020, 00:01
Forum: Ask For Help
Topic: Need help turning one string into 3 variables Topic is solved
Replies: 4
Views: 100

Re: Need help turning one string into 3 variables Topic is solved

Try:

Code: Select all

Pos:= str:= "123.456.789.0"
While Pos {
;While InStr(str, ".") {
    Pos:= RegExMatch(str, "U)\d+\.\d", var)
    var%A_Index%:= var, n:= A_Index
    str:= StrReplace(str, var)
}
loop, % n
    disp.= var%A_Index% "`n"
MsgBox % disp
by rommmcek
26 Nov 2020, 23:09
Forum: Ask For Help
Topic: Trouble understanding RegExMatch
Replies: 4
Views: 102

Re: Trouble understanding RegExMatch

Try: store:= "" fileread, index, test.txt loop, parse, index, `n, `r { toCheck:= RegExReplace(A_LoopField, "U).*\t,,, 1") if StrReplace(toCheck, A_Tab) > 1 store .= toCheck "`n" ; or replace toCheck with A_LoopField to store the whole line. } msgbox, 4096, store, %store% Edit: Adding Limit!
by rommmcek
25 Nov 2020, 11:19
Forum: Scripts and Functions
Topic: [Fuction] Something interesting, fake enumerated type
Replies: 3
Views: 260

Re: [Fuction] Something interesting, fake enumerated type

I'm a poor mathematician, so can't imagen where to use this, however it's a great exemple for using the same memory address, variadic parameters and nested arrays.

P.s.: It seems to me, the last line of the function could be still more compact: name[name[item]:= --index]:= item.
by rommmcek
21 Nov 2020, 22:48
Forum: Ask For Help
Topic: Key that changes the output of other keys Topic is solved
Replies: 9
Views: 143

Re: Key that changes the output of other keys Topic is solved

Try this one:

Code: Select all

1:: modif:= 1
Q::
    If modif
        Send Y
    Else Send X
    modif:= ""
Return
by rommmcek
21 Nov 2020, 15:49
Forum: Ask For Help
Topic: Reading time with very big strings Topic is solved
Replies: 18
Views: 401

Re: Reading time with very big strings Topic is solved

I noticed one obvious syntax bug. First line should be text := ".............." (note the colon).
Don't know if that will solve your problem though.
by rommmcek
18 Nov 2020, 12:14
Forum: Ask For Help
Topic: Trouble with IE COM submitting in input-field.
Replies: 2
Views: 82

Re: Trouble with IE COM submitting in input-field.

Try: ;f1:: id:= "BD20000" pwb:= ComObjCreate("InternetExplorer.Application") pwb.Visible:= True pwb.Navigate("https://www.tffauto.no/minside/ansvarligSelskap") ;Broken Link for safety while (pwb.ReadyState != 4) or (pwb.busy) Sleep, 50 While !wb.document.getElementsByTagName("input") Sleep, 50 pwb.d...
by rommmcek
13 Nov 2020, 20:37
Forum: Ask For Help
Topic: Distinguish between left-click on keyboard's touchpad mouse button and left-click via touchpad tap
Replies: 9
Views: 189

Re: Distinguish between left-click on keyboard's touchpad mouse button and left-click via touchpad tap

This is strange! May be I miss something, but EitherMouse can detect the mouse user is currently using in real time. In a quick test I appended context sensitive hotkey #if (ThisMouse=65595) ; Activate touchpad to display "ThisMouse" number and set the condition to displayed number ;LButton:: Return...
by rommmcek
12 Nov 2020, 20:36
Forum: Scripts and Functions
Topic: MsgBox() for V1
Replies: 18
Views: 871

Re: MsgBox() for V1

Ahk v2.0 considers the last concatenated parameter as the "native" one and this works in all "expressions". I tested the return right now and returned value is as expected, however all preceding "parameters" are not evaluated (are ignored indeed, but only for return AFAIK).
by rommmcek
12 Nov 2020, 19:50
Forum: Tutorials
Topic: Weighted Random Distribution
Replies: 7
Views: 542

Re: Weighted Random Distribution

Coming from you has a double value! Your posts are for me nothing but pure wisdom and shear experience!

P.s.: As mentioned at the start I'm not the author (just adapted it for AuthoHotkey and added some links).
by rommmcek
12 Nov 2020, 19:41
Forum: Tips and Tricks
Topic: Extended parameters
Replies: 2
Views: 694

Re: Extended parameters

Yeah, this is all about sparing one line and your way is possible workaround for the condition quirk (not needed in v2.0). Just came to know it is already around for ca. 14 years , can you believe it? P.s.: I like to use ternaries and functions for one liner too and I find function returning true ju...
by rommmcek
12 Nov 2020, 19:26
Forum: Scripts and Functions
Topic: MsgBox() for V1
Replies: 18
Views: 871

Re: MsgBox() for V1

Thanks for the clarification, so you published it exactly one month before me (Line ~108). But it's pretty rare, I wonder why!
by rommmcek
12 Nov 2020, 17:27
Forum: Scripts and Functions
Topic: MsgBox() for V1
Replies: 18
Views: 871

Re: MsgBox() for V1

Wouldn't it be great if message boxes had an option to show centered on owner GUI? Here is elaborated example for Ahk native MsgBox (based on boiler 's code): #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. ; #Warn ; Enable warnings to assist with detecting c...
by rommmcek
11 Nov 2020, 22:42
Forum: Scripts and Functions
Topic: Random sentence generator
Replies: 2
Views: 371

Re: Random sentence generator

I like the idea, so much so, that I made a bit of condensation, then removed some quirks and syntax peculiarities. #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. ; #Warn ; Enable warnings to assist with detecting common errors. SendMode Input ; Recommended fo...
by rommmcek
05 Nov 2020, 13:07
Forum: Ask For Help
Topic: COM: Don't show pop-up windows when Internet Explorer object is hidden Topic is solved
Replies: 7
Views: 167

Re: COM: Don't show pop-up windows when Internet Explorer object is hidden Topic is solved

Instead of Sand {Tab} try ControlSend,, {Tab}, %popup%.
Edit: Superficial reading, I guess you are already doing it...
by rommmcek
05 Nov 2020, 06:59
Forum: Ask For Help
Topic: COM: Don't show pop-up windows when Internet Explorer object is hidden Topic is solved
Replies: 7
Views: 167

Re: COM: Don't show pop-up windows when Internet Explorer object is hidden Topic is solved

Did you try to fil out the fields with ControlSend command? If it works, then you can hide the "pop up window" via WinEventHook ( ControlSend works on hidden windows too). If not then you can try to cloak the window via WinEventHook ( Send works on cloaked windows too if you dont activate some other...
by rommmcek
29 Oct 2020, 13:54
Forum: Ask For Help
Topic: Copy and paste
Replies: 11
Views: 155

Re: Copy and paste

guys you are missing the point (just paraphrasing [sic] tpitera).
After selection there is a small sleep to be put!
MouseClickDrag, Left, x1, y1, x2, y2
Sleep 200
or Click, up
Sleep 200
by rommmcek
28 Oct 2020, 20:46
Forum: Scripts and Functions
Topic: Using Google Translate to automate text translation
Replies: 129
Views: 29950

Re: Using Google Translate to automate text translation

•私は病院で働いています。•毎日働く時間帯が違います。•私の仕事は英語の先生です。•私は生徒ではありません。•大学生です。•私はフランス料理が好きです。•私は日本食が好きです。•私は180センチです。•私の趣味は買い物です。•私はアメリカ出身です。•フランスから来ました。•私はブラジルの出身です。•初めまして。•はじめまして、私の名前はダグラスです、よろしくお願いします。 this (ad hoc) fix seems to work on the input side. Replace Src.= Str ((Pr1:= ojson[0][1][3])? "`n[" Pr1 "]": ""...
by rommmcek
28 Oct 2020, 20:42
Forum: Ask For Help
Topic: Remapping problem: Shift+NumpadEnd only works once!?
Replies: 20
Views: 537

Re: Remapping problem: Shift+NumpadEnd only works once!?

Yes you guessed! See my edited post above! Please edit your quote in previous post! Thanks and sorry!

Go to advanced search