Search found 17 matches

by Hotte
08 Jun 2018, 15:15
Forum: Scripts and Functions
Topic: Find a substring in between 2 other substrings
Replies: 10
Views: 820

Re: Find a substring in between 2 other substrings

Exactly. That is what it was supposed to do: An non-technical approach to strings or to analyse tagged text. Originally I wrote it to read a table of technical specifications. Something like: t := "Rate: 100 bits/s`nFormat: 1920 x 1080`nColor-depth: 10 bits`nNo of audio channels: 5`nCompression: h.2...
by Hotte
06 Jun 2018, 15:21
Forum: Scripts and Functions
Topic: Get number of frames in an AVI Video File (learn about the usage of file read & pointers & number conversion)
Replies: 10
Views: 698

Re: Get number of frames in an AVI Video File (learn about the usage of file read & pointers & number conversion)

Ok, this is mabye 'bit off topic, but I do not want to make autohotkey a video-solution forum, so do not want to start a new thread and it pairs well with the number of frames issue above. This is a function that converts a video timecode into the proper framenumber. Input: tc = timecode as string e...
by Hotte
06 Jun 2018, 14:03
Forum: Scripts and Functions
Topic: Get number of frames in an AVI Video File (learn about the usage of file read & pointers & number conversion)
Replies: 10
Views: 698

Re: Get number of frames in an AVI Video File (learn about the usage of file read & pointers & number conversion)

Thank you very much, Burque - very useful solutions. :bravo:

It's always great to see, how the community contributes and makes things grow

If you are interested in two timecode conversion routines that really work right, let me know.
by Hotte
06 Jun 2018, 13:09
Forum: Scripts and Functions
Topic: Find a substring in between 2 other substrings
Replies: 10
Views: 820

Re: Find a substring in between 2 other substrings

Wow, I have always admired the heroes of RegEx coding. It would probably take me 2 days to understand, and 2 others to put it in RegEx. So many thanks for this! :clap: Edit Just be clear that partStr2 handles multiline strings differently: If you want CR,LF to be ignored go for partStr2. If you want...
by Hotte
06 Jun 2018, 12:57
Forum: Scripts and Functions
Topic: Get number of frames in an AVI Video File (learn about the usage of file read & pointers & number conversion)
Replies: 10
Views: 698

Re: Get number of frames in an AVI Video File (learn about the usage of file read & pointers & number conversion)

@burque505, Thanks, very nice little tool!

@swagfaq, puh, not sure... position was a bit trial&error but works fine. Has it sth to do with 16 bit instead of 8 ?
by Hotte
06 Jun 2018, 12:25
Forum: Scripts and Functions
Topic: Find a substring in between 2 other substrings
Replies: 10
Views: 820

Find a substring in between 2 other substrings

Hi, this is not the same as Instr(). It is a new function for easy string-in-between-strings search. Best illustration is examples: a := "the big brown fox jumps over the lazy dog" msgbox % partStr(a,"fox","over") returns "jumps" - no leading or trailing spaces msgbox % partStr(a,,"brown") returns "...
by Hotte
06 Jun 2018, 11:25
Forum: Scripts and Functions
Topic: Get number of frames in an AVI Video File (learn about the usage of file read & pointers & number conversion)
Replies: 10
Views: 698

Get number of frames in an AVI Video File (learn about the usage of file read & pointers & number conversion)

This small function returns the number of video frames in a given AVI video file. Maybe somebody was looking for that. Usage like msgbox % "myvideo.avi has " . getAVIFrames("c:\desktop\myvideo.avi") . " Frames" by Hotte getAviFrames(avifullpath) { fileObj := FileOpen(avifullpath,"r") ; Open file for...
by Hotte
19 Mar 2018, 07:50
Forum: Ask For Help
Topic: 2nd Script removes functions of 1st Script
Replies: 3
Views: 270

Re: 2nd Script removes functions of 1st Script

Not going into details just one hint - maybe it helps: Autohotkey does not do real multitasking. It cannot execute 2 scripts at the same time. If thread (= active script) A runs and thread B drops in, thread A will halt and continue only when thread B has terminated.
by Hotte
05 Jan 2018, 12:44
Forum: Ask For Help
Topic: Send 2d Array Value and Enter Topic is solved
Replies: 3
Views: 306

Re: Send 2d Array Value and Enter Topic is solved

Send, % Array[r,c] . "{Enter}"

The % sign forces what is behind to be an expression. The dot forms string components to become a string.
by Hotte
05 Jan 2018, 11:16
Forum: Scripts and Functions
Topic: Save AHK-Operation: winSend, winClick and more
Replies: 5
Views: 688

Re: Save AHK-Operation: winSend, winClick and more

@jsmain Thank you very much - very generous and excellent translation indeed! :bravo: :bravo: :bravo: @guest3456: Oh, I just realize, that my intro could be misleading. I am not saying, that send is not working for me. The idea is : For very complex applications it is increasingly difficult to have ...
by Hotte
04 Jan 2018, 20:32
Forum: Ask For Help
Topic: WinWait not always consistent...
Replies: 2
Views: 268

Re: WinWait not always consistent...

Generally it is very difficult to get 100% reliabilty. If macros get more complex you are getting a lot of timing difficulties and you will eventually need some nasty loops & sleep-statements to get things working. Its a matter of a lot of fine-tuning and hopefully no user-interference. => ifWinExis...
by Hotte
04 Jan 2018, 08:34
Forum: Ask For Help
Topic: Want to choose to bypass or passing on the ~LButton Topic is solved
Replies: 7
Views: 593

Re: Want to choose to bypass or passing on the ~LButton Topic is solved

That was the right idea. I even do not need the coordinates, just the window: #if blockMouseClick() LButton::Return #if ; Could be replaced by any #ifWinActive blablaWinTitle blockMouseClick() { CoordMode,Mouse,Screen MouseGetPos,,,win_id CoordMode,Mouse,Relative WinGetTitle,wt,ahk_id %win_id% if (w...
by Hotte
04 Jan 2018, 05:12
Forum: Ask For Help
Topic: Want to choose to bypass or passing on the ~LButton Topic is solved
Replies: 7
Views: 593

Re: Want to choose to bypass or passing on the ~LButton Topic is solved

Mmmhh, sorry to ask again, but I found a new problem: The example above works fine as long as the user clicks LButton WITHIN the protected window. However, if ANOTHER window is active and the user DIRECTLY CLICKS on LButton FROM OUTSIDE INTO the protected window, the LButton is being passed on to th...
by Hotte
03 Jan 2018, 19:55
Forum: Ask For Help
Topic: Want to choose to bypass or passing on the ~LButton Topic is solved
Replies: 7
Views: 593

Re: Want to choose to bypass or passing on the ~LButton Topic is solved

This use of #if did not come to my mind. Now the following: #if blockMouseClick() LButton::Return #if ; Could be replaced by any #ifWinActive blablaWinTitle blockMouseClick() { if not clickCheckActive ; This is a global switch variable, which is activated in my code when needed return false MouseGet...
by Hotte
03 Jan 2018, 17:43
Forum: Ask For Help
Topic: Want to choose to bypass or passing on the ~LButton Topic is solved
Replies: 7
Views: 593

Re: Want to choose to bypass or passing on the ~LButton Topic is solved

foxhunter, I need to use the same #IfWinActive for the same window but different situations like this: ~LButton::myfunction() myfunction() { static check ; ... some checks ... if check { msgbox You pressed the LButton, but that is not allowed at the moment. I eat up your click now. exit } else msgbo...
by Hotte
03 Jan 2018, 17:25
Forum: Scripts and Functions
Topic: Save AHK-Operation: winSend, winClick and more
Replies: 5
Views: 688

Save AHK-Operation: winSend, winClick and more

Hi, I am working on a huge AHK-project for more than two years now. One of the biggest issues concerning stable operation is that send and click commands are being received by the correct window. If the sends drop in too early or too late or if the user interferes, you easily get a mess. This is why...
by Hotte
03 Jan 2018, 15:02
Forum: Ask For Help
Topic: Want to choose to bypass or passing on the ~LButton Topic is solved
Replies: 7
Views: 593

Want to choose to bypass or passing on the ~LButton Topic is solved

I`d like to gain full control over the left mouse button inclusive of click&drag. When I am using: LButton::(something) => something is being performed, however I eventually need to add a "click" statement to perform an action AND, sadly, click&drag will NOT work anymore with LButton:: When I am usi...

Go to advanced search