Search found 5406 matches

by jeeswg
Today, 01:15
Forum: Scripts and Functions
Topic: Function Calculating Timespan in Years, Months, and Days
Replies: 11
Views: 627

Re: Function Calculating Timespan in Years, Months, and Days

Hello, I just shared a similar function here. Thanks.
DateAdd/DateDiff with friendly format - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=6&t=59825
by jeeswg
Today, 01:11
Forum: Scripts and Functions
Topic: DateAdd/DateDiff with friendly format
Replies: 0
Views: 23

DateAdd/DateDiff with friendly format

- The code uses the approach of start at the lower (earlier) date and add years until you overshoot, then subtract 1. And likewise for months. You then have 2 dates for which a simple seconds difference can be calculated allowing you to work out D/H/M/S. - The JEE_DateDiffFriendly function was a bea...
by jeeswg
Yesterday, 20:52
Forum: Scripts and Functions
Topic: BitGet/BitPut (NumGet/NumPut for bits)
Replies: 3
Views: 182

Re: BitGet/BitPut (NumGet/NumPut for bits)

- @Helgef: Thanks for testing and for the interesting code. - I've updated the comments to say 'left-to-right'. - One reason I posted is that there could be some elegant bit hacks that I might have missed. - Had you already written functions like this? Did you have any example code from another lang...
by jeeswg
Yesterday, 14:54
Forum: Ask For Help
Topic: which languages should I learn to learn DllCall and Windows API Functions?
Replies: 8
Views: 205

Re: which languages should I learn to learn DllCall and Windows API Functions?

- @Helgef: The OP centres around *DllCall*, which sometimes requires the use of structs. The core problems with DllCall are type sizes/signs, struct alignment, and knowing the values of constants. I do not feel that being able to program in other languages has any relevance to answering these questi...
by jeeswg
Yesterday, 14:00
Forum: Ask For Help
Topic: which languages should I learn to learn DllCall and Windows API Functions?
Replies: 8
Views: 205

Re: which languages should I learn to learn DllCall and Windows API Functions?

- I found this video by Derek Banas great, as an introduction to C++. C++ Programming - YouTube https://www.youtube.com/watch?v=Rub-JsjMhWY - I list various other programming language resources here: resources for learning a programming language - AutoHotkey Community https://autohotkey.com/boards/v...
by jeeswg
Yesterday, 13:09
Forum: Offtopic
Topic: « What's on your mind? » Topic is solved
Replies: 4003
Views: 512035

Re: « What's on your mind? » Topic is solved

Important video.
Johnny Knoxville Breaks Down Every Injury of His Career | Vanity Fair - YouTube
https://www.youtube.com/watch?v=ZsKXq8AQTZE
by jeeswg
Yesterday, 10:29
Forum: Ask For Help
Topic: Help with adding a month (related to time in general, not only the code)
Replies: 6
Views: 94

Re: Help with adding a month (related to time in general, not only the code)

- I wanted a function to add/subtract n months to/from a date. - I chose the following approach: Jan 29 + 1 month -> Feb 29 (invalid) -> Feb 28 Jan 29 + 2 months -> Mar 29 Jan 29 + 3 months -> Apr 29 Jan 31 + 1 month -> Feb 31 (invalid) -> Feb 30 (invalid) -> Feb 29 (invalid for a 365-day year) -> F...
by jeeswg
08 Dec 2018, 21:03
Forum: Scripts and Functions
Topic: file get part (SplitPath alternative/short-form/long-form/correct case)
Replies: 4
Views: 443

Re: file get part (SplitPath alternative/short-form/long-form/correct case)

- I've added a file set part counterpart. - I've done a fair amount of testing but these functions can be fiddly, so do notify of any issues. And besides I *always* MsgBox the first few before/after paths before doing any batch renaming/moving etc. - I was recreating some C:\dir\name to C:\dir\SUBDI...
by jeeswg
08 Dec 2018, 19:25
Forum: Scripts and Functions
Topic: alt-tab replacement
Replies: 6
Views: 707

Re: alt-tab replacement

- @Thoughtfu1Tux: Thanks for your input. - Everything depends on this function: JEE_WinHasAltTabIcon. I've tried my best to correctly identify which windows would appear in the alt-tab window, and recreate that. - Btw you could check that you are using the most up-to-date version, I updated the post...
by jeeswg
08 Dec 2018, 17:48
Forum: Ask For Help
Topic: which languages should I learn to learn DllCall and Windows API Functions?
Replies: 8
Views: 205

Re: which languages should I learn to learn DllCall and Windows API Functions?

- The answer is AutoHotkey. - Why? - C++ makes it easier than AutoHotkey by handling the types for you when calling functions, and handling the struct members like an associative array when handling structs. ;Winapi function example ;AutoHotkey DllCall("user32\MessageBox", Ptr,0, Str,"prompt", Str,"...
by jeeswg
08 Dec 2018, 14:08
Forum: Ask For Help
Topic: IE COM fire click event
Replies: 11
Views: 242

Re: IE COM fire click event

- @malcev: Many thanks for your efforts, much appreciated. - Btw other browsers support 'f', so perhaps 'f' is worth trying. - Interestingly, I've found that this can be done via Acc. q:: ;internet explorer - youtube - full screen WinGet, hWnd, ID, A ;note: the Acc path can change ;oAcc := Acc_Get("...
by jeeswg
07 Dec 2018, 08:54
Forum: Ask For Help
Topic: IE COM fire click event
Replies: 11
Views: 242

Re: IE COM fire click event

- @malcev: What is the value of _ supposed to be, is a blank string OK?
- Do you have any ideas for this script? E.g. to send a click or enter key. I used ControlSend for it. Thanks.
script to full screen YouTube videos - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=5&t=34868
by jeeswg
07 Dec 2018, 02:26
Forum: Scripts and Functions
Topic: BitGet/BitPut (NumGet/NumPut for bits)
Replies: 3
Views: 182

BitGet/BitPut (NumGet/NumPut for bits)

Some code for reading/writing bits from binary data. Do make any suggestions or notify of any issues or related scripts. q:: ;test bit put and bit get vSizeBits := 3 oArray := [0, 2**vSizeBits-1] VarSetCapacity(vData, 100000, 0) vOffset := 0, vNext := 0 Loop, % 10*8 { vNext++ if (vNext > oArray.Leng...
by jeeswg
07 Dec 2018, 00:14
Forum: Ask For Help
Topic: printf()
Replies: 20
Views: 474

Re: printf()

When I use #Warn in StdOut mode, the warnings don't appear in the console. Any ideas? Thanks.
by jeeswg
06 Dec 2018, 23:48
Forum: AutoHotkey_H
Topic: Implement missing functions
Replies: 9
Views: 250

Re: Implement missing functions

- (I meant to say more clearly above, I've only tried to compile pure C++ code, never with any Winapi functions.) - I tried with MCode4GCC but it didn't work, if someone who's tried using MCode4GCC to compile C++ code with Winapi functions could chip in. - It output some code, created without errors...
by jeeswg
06 Dec 2018, 22:23
Forum: Ask For Help
Topic: Empty section in IniFile
Replies: 1
Views: 63

Re: Empty section in IniFile

I did some tests by using the built-in IniRead/IniWrite functionality. You can read/write whole sections, the text can be anything, it doesn't have to be key=value pairs. q:: ;test write ini sections vPath := A_Desktop "\z ini " A_Now ".txt" ;vText := "" vText := "`r`n" ;vText := "`r`n`r`n" ;vText :...
by jeeswg
06 Dec 2018, 18:04
Forum: Scripts and Functions
Topic: Internet Explorer: focus input field
Replies: 4
Views: 244

Re: Internet Explorer: focus input field

- @kczx3: The getElementsByTagName code was based on some template code. While writing this script I noticed the issue. I have been/am improving various forum posts for the minor performance gains. - Brush up on what exactly? I've responded re. getElementsByTagName, and re. querySelector/querySelect...
by jeeswg
06 Dec 2018, 07:13
Forum: AutoHotkey_H
Topic: Implement missing functions
Replies: 9
Views: 250

Re: Implement missing functions

- I haven't tried to do that. I only use a handful of machine code functions for the quick reading/writing of bits/bytes. I'd use DllCall for calling Winapi functions. - Can't you just use TDM-GCC or do something similar to what AutoIt does? What does AutoIt do? - Btw if you have any comments re. th...
by jeeswg
05 Dec 2018, 23:53
Forum: Ask For Help
Topic: Maintain leading zeros for a variable Topic is solved
Replies: 2
Views: 53

Re: Maintain leading zeros for a variable Topic is solved

Here. Cheers.

Code: Select all

i:=1
^Up::
	send % Format("{:03} ", i)
	send ^v
	i++
	return
Btw in AHK v2, i := 001 would lose its zeros, you'd have to do i := "001".

Go to advanced search