Search found 553 matches

by 4GForce
23 Mar 2017, 18:26
Forum: Ask for Help (v1)
Topic: Disable Moving a MsgBox
Replies: 19
Views: 5201

Re: Disable Moving a MsgBox

qwerty12 wrote:Yet another one. I won't vouch for the reliability of this code...
Well even tho it seems a bit hardcore for such a small issue ... it works fine and having a ; WTF in the 1st 10 lines makes it even better :HeHe:
by 4GForce
23 Mar 2017, 17:06
Forum: Ask for Help (v1)
Topic: [SMF] Short My Function - Seconds to string
Replies: 21
Views: 5615

Re: [SMF] Short My Function - Seconds to string

A pure mathematical function (with mod / floor /... maybe some bithacks or magic numbers if possible) would be nice too see (but without FormatTime / Env... / SubStr / RegEx...) Is there a wrong answer ? CalcTime(sec) { static values := [{symbol: "d", val: 86400, modulus: 365}, {symbol: "h", val: 3...
by 4GForce
23 Mar 2017, 16:18
Forum: Ask for Help (v1)
Topic: [SMF] Short My Function - Seconds to string
Replies: 21
Views: 5615

Re: [SMF] Short My Function - Seconds to string

A pure mathematical function (with mod / floor /... maybe some bithacks or magic numbers if possible) would be nice too see (but without FormatTime / Env... / SubStr / RegEx...) Is there a wrong answer ? CalcTime(sec) { static values := [{symbol: "d", val: 86400, modulus: 365}, {symbol: "h", val: 3...
by 4GForce
23 Mar 2017, 15:27
Forum: Ask for Help (v1)
Topic: Dynamic hotstring - interval of numbers
Replies: 1
Views: 814

Re: Dynamic hotstring - interval of numbers

dexter30 wrote:When compiling, this error is shown (attachment)
Can't see the attachment ... RegRead might require privileges ... run as admin ?!
by 4GForce
23 Mar 2017, 15:12
Forum: Ask for Help (v1)
Topic: Disable Moving a MsgBox
Replies: 19
Views: 5201

Re: Disable Moving a MsgBox

:D Well now its my fault ... but #IfWinActive can somehow be bypassed ( hover icon in taskbar, then hover the preview, wait a sec then hold left click ... move to the window and release left-click and click hold again to move it :wtf: ) So MouseGetPos might be necessary after all. Edit: Win7 ... an...
by 4GForce
23 Mar 2017, 14:52
Forum: Ask for Help (v1)
Topic: Disable Moving a MsgBox
Replies: 19
Views: 5201

Re: Disable Moving a MsgBox

A MsgBox has the ahk_class #32770 , for those, we can do something like this, Vnice blocking the mousemove on left click ... but sadly ... it can be move by right-clicking, select Move ... then press spacebar and move with the arrow keys ... :shock: MsgBox % "Move me !" #IfWinActive ahk_class #3277...
by 4GForce
23 Mar 2017, 11:54
Forum: Ask for Help (v1)
Topic: Formatting text in clipbaord
Replies: 1
Views: 778

Re: Formatting text in clipbaord

If you want the keys to be processed by send then don't use the clipboard to paste the text. :*:q1:: Send Yes we do have availability for you and we would be delighted if you chose to stay with us. The cost will be £11.50 per teenager/adult per night and £8.50 per night per child (those in nappies a...
by 4GForce
23 Mar 2017, 10:47
Forum: Ask for Help (v1)
Topic: Disable Moving a MsgBox
Replies: 19
Views: 5201

Re: Disable Moving a MsgBox

how can I disable moving on a MsgBox. My solution is kinda ugly, but it works ... BUTTON_MSGBOX: SetTimer DoSomething, -25 ret := MessageBox(hMyGUI, "Random Title", "YES or NO?", 0x24) GuiControl,, MyEdit, % (ret = 7) ? "NO!" : "YES!" return DoSomething: ; WinWait % "Random Title" WinSet Style, -0x...
by 4GForce
23 Mar 2017, 09:09
Forum: Ask for Help (v1)
Topic: [SMF] Short My Function - Seconds to string
Replies: 21
Views: 5615

Re: [SMF] Short My Function - Seconds to string

But is there any shorter way? I'll post this before reading the rest of the post ... CalcTime(sec) { timestamp := "2017" timestamp += sec, Seconds format .= (sec >= 3600) ? "HH'h'" : "" format .= (sec >= 60 ) ? "mm'm'" : "" FormatTime hms, % timestamp, % format . "ss's'" Return (sec >= 86400) ? flo...
by 4GForce
23 Mar 2017, 00:00
Forum: Ask for Help (v1)
Topic: I need help, toggle button.
Replies: 1
Views: 1181

Re: I need help, toggle button.

Probably not the best but a simple button binded to Reload might work

Code: Select all

F9::Reload  ; insert this line before [c]F5::[/c] ( just after [c]Gui, Show[/c] )
by 4GForce
22 Mar 2017, 23:44
Forum: Ask for Help (v1)
Topic: Listview : How to remove header pinline ?
Replies: 7
Views: 2552

Re: Listview : How to remove header pinline ?

yes there is only one column. sorry about that but it appears with that code Well it is a column separator ... kind of ... allows you to resize the column even tho there is just one. Weird behavior. Simple solution would be to add 0x2000 ( LVS_NOSCROLL ) to the listview options and make the column ...
by 4GForce
22 Mar 2017, 23:34
Forum: Ask for Help (v1)
Topic: Dequeue a class via an enumeration loop
Replies: 16
Views: 5747

Re: Dequeue a class via an enumeration loop

The wrong keys are removed within the loop despite indexesToDequeue brings the correct keys to remove. Been thinking about that a little ... what if you handle the whole queue in reverse ... new objects ( first in ) are added at index 1 ( InsertAt(1, v) instead of Push(v) ) and you pop first served...
by 4GForce
22 Mar 2017, 18:44
Forum: Ask for Help (v1)
Topic: Please help fix my code :( Topic is solved
Replies: 2
Views: 1141

Re: Please help fix my code :( Topic is solved

Well those are fun pancakes facts ! Now some code facts ;) No reason to assign object() to Number since its assigned 0 later on and its never used as an object ... see https://autohotkey.com/docs/Objects.htm Fact is used as an array, but with some synthax issues ... see https://autohotkey.com/docs/O...
by 4GForce
22 Mar 2017, 18:14
Forum: Ask for Help (v1)
Topic: Listview : How to remove header pinline ?
Replies: 7
Views: 2552

Re: Listview : How to remove header pinline ?

Random guess without seeing the code but it looks like a column separator ... you wouldn't have a second column that is empty would you ?
by 4GForce
22 Mar 2017, 18:06
Forum: Ask for Help (v1)
Topic: Using an Array in ControlGetText? (Plus a Bunch of Object Q&A!) Topic is solved
Replies: 38
Views: 10315

Re: Using an Array in ControlGetText? Topic is solved

Does __New need to return? Not in your case ... you don't have to override the new operator. Whenever a derived object is created with the new keyword [requires v1.1.00+], the __New method defined by its base object is called. This method can accept parameters, initialize the object and override th...
by 4GForce
22 Mar 2017, 17:43
Forum: Ask for Help (v1)
Topic: Dequeue a class via an enumeration loop
Replies: 16
Views: 5747

Re: Dequeue a class via an enumeration loop

Oh man...this is really annoying :( I cant get this right despite countless of hours spent. Please help me! The hardest is, as always, the conditioning to cover all cases that might break it. The array im working with contains several empty keys after a Delete for loop. Im looking for a way to alwa...
by 4GForce
22 Mar 2017, 17:29
Forum: Ask for Help (v1)
Topic: Using an Array in ControlGetText? (Plus a Bunch of Object Q&A!) Topic is solved
Replies: 38
Views: 10315

Re: Using an Array in ControlGetText? Topic is solved

A couple things are still happening that I don't understand. 1) There are a few things going on there. You probably noticed that MyVar4 define the getter and setter for the variable _myVar4 ... As far as I'm concerned this is AHK specific since in other languages you would use the same name. But do...
by 4GForce
22 Mar 2017, 14:49
Forum: Ask for Help (v1)
Topic: Alt-tab using middle mouse button ONLY
Replies: 8
Views: 4526

Re: Alt-tab using middle mouse button ONLY

...And we should not forget the following in the Timer routine! :mrgreen: SetTimer OnIdle, Off This is not needed if you use negative delay like I did. [v1.0.46.16+]: If Period is negative, the timer will run only once. As for held down buttons, you could use KeyWait RButton:: start := A_TickCount ...
by 4GForce
22 Mar 2017, 14:28
Forum: Ask for Help (v1)
Topic: Using an Array in ControlGetText? (Plus a Bunch of Object Q&A!) Topic is solved
Replies: 38
Views: 10315

Re: Using an Array in ControlGetText? Topic is solved

@4GForce Thanks. The various class subroutines are something that I just could not wrap my head around, even after reading the help files, but I think I am understanding it now. I'll play around with that code when I get the chance. I'm glad if that helped, hopefully its going to help some other re...
by 4GForce
22 Mar 2017, 14:12
Forum: Ask for Help (v1)
Topic: RegExMatch() get all matches
Replies: 12
Views: 5223

Re: RegExMatch() get all matches

However, my script is not working as expected. Regular Expression Callouts https://autohotkey.com/docs/misc/RegExCallout.htm E.g. instead of: '1,2,3'. I'm getting: '1,12,123,2,23,3'. Do callouts not handle 'greedy'/'ungreedy', for example? Do they treat 'dot all' differently? Any assistance would b...

Go to advanced search