Search found 327 matches

by hagchr
Tue Aug 30, 2022 8:31 am
Forum: Technical / Scripting
Topic: Macro cuts off char
Replies: 8
Views: 4044

Re: Macro cuts off char

Hi! Looks strange... You could try to send the text to Notepad to check if that gives the same result. Also make sure the variables are defined correctly. For example, the first (incorrect) version below would give the (first) problem you encounter:

Let>%BWID%=123456
Let>BWID=123456
by hagchr
Tue Aug 02, 2022 9:37 am
Forum: Scripts and Tips
Topic: Rearrange array elements (random order)
Replies: 0
Views: 32173

Rearrange array elements (random order)

A simple algorithm for rearranging array elements in random order. The bottom part is just to convert the array back to a string to show it in an MDL>. Maybe ArrayRand> could be considered for future updates? // Script to rearrange array elements in a random order. // Let>str=1,2,3,4,5,6,7,8,9,10,11...
by hagchr
Thu Jul 14, 2022 6:18 am
Forum: Technical / Scripting
Topic: Converting Text to Numeric
Replies: 12
Views: 10537

Re: Converting Text to Numeric

Sorry, I thought you were just looking for one digit. Simply change from \d (one digit) to \d+ (one or more digits) and you should catch all.
by hagchr
Tue Jul 12, 2022 1:01 pm
Forum: Technical / Scripting
Topic: GetWindowHandle Timeout?
Replies: 10
Views: 5879

Re: GetWindowHandle Timeout?

I added the process ID and process name (...exe etc) to the output. One more dimension but maybe still an issue if your project name keeps changing. Let>WIN_USEHANDLE=1 GetActiveWindow>strTitle,nXPos,nYPos,, GetWindowParent>strTitle,1,hWnd GetWindowChildList>hWnd,child_list Let>res= //all handles ->...
by hagchr
Tue Jul 12, 2022 10:37 am
Forum: Technical / Scripting
Topic: GetWindowHandle Timeout?
Replies: 10
Views: 5879

Re: GetWindowHandle Timeout?

Hi! I played around with trying to find window handles and your solution with GetWindowList> seems to work fine with easy top level windows. Tried to change WF_TYPE to see if it is possible to to get all (visible, child ...) windows but no change in result. Then I tried to get the parent of the curr...
by hagchr
Tue Jul 12, 2022 6:45 am
Forum: Technical / Scripting
Topic: Converting Text to Numeric
Replies: 12
Views: 10537

Re: Converting Text to Numeric

Small tip. If you are just looking for the digit/number you can search for that directly eg:

Code: Select all

regex>\d,myStr,0,matches,num,0
\d will look for a digit, and your number will be in matches_1.
by hagchr
Fri Jul 08, 2022 9:35 pm
Forum: Technical / Scripting
Topic: Window Handles and Finding Windows...
Replies: 2
Views: 3027

Re: Window Handles and Finding Windows...

Hi, your RegEx patterns will look search the whole string. If you want the string to start with the pattern then you need to anchor it with a ^ (start of string), ie Let>cubpat=^Cubase .+ Let>nuepat=^Nuendo .+ (Look for a start of string character (^) followed by Cubase / Nuendo etc). If the names s...
by hagchr
Thu Jul 07, 2022 6:53 pm
Forum: Technical / Scripting
Topic: Any way to get which item has been clicked in a dialog?
Replies: 8
Views: 4980

Re: Any way to get which item has been clicked in a dialog?

Hi, Great that you have sorted it out. Some more thoughts: For "loading" the the entire ini file you could also read it as a normal file, into a variable, remove the [KEYS] row and simply add Let> at the beginning of each row using RegEx>. Then by using IncludefromVar> all ini-variables will be upda...
by hagchr
Sun Jul 03, 2022 12:36 pm
Forum: Technical / Scripting
Topic: Any way to get which item has been clicked in a dialog?
Replies: 8
Views: 4980

Re: Any way to get which item has been clicked in a dialog?

Hi, I don't know if you can remove dialoghandlers by passing a parameter, but you can pass a parameter in the SRT call. Not sure if it helps... Dialog>Dialog1 object Dialog1: TForm Left = 266 Top = 104 HelpContext = 5000 BorderIcons = [biSystemMenu] Caption = 'CustomDialog' ClientHeight = 389 Client...
by hagchr
Tue May 31, 2022 5:12 pm
Forum: Technical / Scripting
Topic: Help with JSONPARSE
Replies: 4
Views: 3437

Re: Help with JSONPARSE

alternative: HTTPRequest>https://1ml.com/channel?json=true,,GET,,sJSON JSONParse>sJSON,$..channel_id,ChannelID JSONParse>sJSON,$..fee_base_msat,feebase JSONParse>sJSON,$..fee_rate_milli_msat,feerate I note you have more than one feebase/feerate per channel so depends how you want to parse it out. Eg...
by hagchr
Sat May 28, 2022 7:09 pm
Forum: The Water Cooler
Topic: The Unofficial Macro Scheduler Puzzler #13
Replies: 17
Views: 49186

Re: The Unofficial Macro Scheduler Puzzler #13

Hi, I have tried your script during some 1100 minutes (exe based on MS 15) and get: 998 = 0 = 0 999 = 8 = 0.00721370604147881 000 = 979 = 0.882777276825969 001 = 94 = 0.084761045987376 002 = 12 = 0.0108205590622182 003 = 8 = 0.00721370604147881 004 = 2 = 0.0018034265103697 005 = 0 = 0 006 = 2 = 0.00...
by hagchr
Thu May 05, 2022 9:37 am
Forum: The Water Cooler
Topic: The Unofficial Macro Scheduler Puzzler #13
Replies: 17
Views: 49186

Re: The Unofficial Macro Scheduler Puzzler #13

It just struck me that the computer working well is writing to an internal SSD drive vs the other laptop that is writing to a standard spinning drive. Could that cause the difference in performance?
by hagchr
Mon May 02, 2022 7:49 pm
Forum: The Water Cooler
Topic: The Unofficial Macro Scheduler Puzzler #13
Replies: 17
Views: 49186

Re: The Unofficial Macro Scheduler Puzzler #13

Hi, based on your last "TimerTest" script, I created a small "spray and pray" function that I added to my original script. In stead of 30 DateStamps, I think 10 will work fine in my case. After 500 runs it shows around 89%. Will see how it moves as time progresses. I also tried on my other machine a...
by hagchr
Fri Apr 29, 2022 8:23 pm
Forum: The Water Cooler
Topic: The Unofficial Macro Scheduler Puzzler #13
Replies: 17
Views: 49186

Re: The Unofficial Macro Scheduler Puzzler #13

Hi, Dear Taskmaster! I have adjusted your script and run it on my machine, with results like: 995 = 0 = 0 996 = 0 = 0 997 = 0 = 0 998 = 0 = 0 999 = 188 = 0.152597402597403 000 = 823 = 0.668019480519481 001 = 172 = 0.13961038961039 002 = 4 = 0.00324675324675325 003 = 6 = 0.00487012987012987 004 = 8 =...
by hagchr
Mon Apr 25, 2022 8:57 pm
Forum: The Water Cooler
Topic: The Unofficial Macro Scheduler Puzzler #13
Replies: 17
Views: 49186

Re: The Unofficial Macro Scheduler Puzzler #13

JRL, Thought I had it, then tried running a compiled version... and got worse numbers. Adjusted now, and doing the check run. I note that (at least for my solution) it is Load% dependent. Checking different loads and the spot-on-hit-rate I note: Load(%) HitRate 0-9 84% 10-19 79% 20-29 69% 30-39 63% ...
cron
Sign up to our newsletter for free automation tips, tricks & discounts