Search found 277 matches

by hagchr
Mon Nov 05, 2018 10:42 am
Forum: Technical / Scripting
Topic: Select an item in ListBox
Replies: 7
Views: 1143

Re: Select an item in ListBox

Hi, this works for me, maybe I misunderstood the question. Dialog>Dialog1 object Dialog1: TForm Left = 247 Top = 97 HelpContext = 5000 BorderIcons = [biSystemMenu] Caption = 'CustomDialog' ClientHeight = 211 ClientWidth = 476 Color = clBtnFace Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText...
by hagchr
Mon Nov 05, 2018 8:43 am
Forum: Technical / Scripting
Topic: Select an item in ListBox
Replies: 7
Views: 1143

Re: Select an item in ListBox

Have you tried using:

Code: Select all

SetDialogProperty>Dialog1,MSListBox1,SelectedIndex,0
with the last item (here 0) picking item to be selected, 0 for the first item, 1 for the second aso.
by hagchr
Thu Sep 20, 2018 9:45 am
Forum: Enhancement Suggestions
Topic: Open in New Tab...
Replies: 0
Views: 4570

Open in New Tab...

When opening a file using "Open in New Tab..." it would be convenient to have the selection browser start already at your ms script folder (now you have to click your way from eg the desktop to locate first the script folder and then the script)... or is there a setting I have missed?
by hagchr
Thu May 10, 2018 1:34 pm
Forum: Technical / Scripting
Topic: Convert hh:dd:ss to seconds for timer
Replies: 3
Views: 702

Re: Convert hh:dd:ss to seconds for timer

Hi, I changed it so that it does not matter if one or two characters are used. Let>str1=04:33:20 Let>str2=7:21 Gosub>Get_secs,str1 MDL>res_secs Gosub>Get_secs,str2 MDL>res_secs SRT>Get_secs // Get the input variable into a variable str Let>str=Get_secs_VAR_1 // Remove any initial or trailing spaces ...
by hagchr
Thu May 10, 2018 11:19 am
Forum: Technical / Scripting
Topic: Convert hh:dd:ss to seconds for timer
Replies: 3
Views: 702

Re: Convert hh:dd:ss to seconds for timer

Hi, If the you always have two characters for each component (eg 05:13 and not 5:13 etc) then you can use something like: Let>str1=04:33:20 Let>str2=07:21 Gosub>Get_secs,str1 MDL>res_secs Gosub>Get_secs,str2 MDL>res_secs SRT>Get_secs // Get the input variable into a variable str Let>str=Get_secs_VAR...
by hagchr
Thu Apr 12, 2018 2:21 pm
Forum: Technical / Scripting
Topic: Web Automation
Replies: 2
Views: 898

Re: Web Automation

Hi, It seems if you adjust the link of the movie then you can get to the full list directly, eg:

http://www.imdb.com/title/tt0076759/
Adjust to:
http://www.imdb.com/title/tt0076759/fullcredits
by hagchr
Tue Nov 14, 2017 8:47 am
Forum: The Water Cooler
Topic: The Unofficial Macro Scheduler Puzzler #12
Replies: 12
Views: 5295

Re: The Unofficial Macro Scheduler Puzzler #12

Hi JRL, long time no Puzzle... He/She who waits for something good...

I get an error when I run it "Error in: _debug.dbg. Line: 1 - Unable to load content for dialog: D1. Error in dialog block"

Any idea what is happening?
by hagchr
Fri Apr 14, 2017 6:29 am
Forum: Technical / Scripting
Topic: Confirm screenimage
Replies: 2
Views: 1149

Re: Confirm screenimage

In the help section it seems that if you use WSI_TIMEOUT then the variable to check for TRUE/FALSE is WSI_TIMEDOUT (with D).
by hagchr
Thu Mar 30, 2017 2:20 pm
Forum: Technical / Scripting
Topic: Tell it to write X and it puts a 0
Replies: 4
Views: 1637

Re: Tell it to write X and it puts a 0

Maybe you are using x as a variable somewhere in the code and it has a value of 0 when you write to the file.
by hagchr
Thu Mar 30, 2017 12:34 pm
Forum: Technical / Scripting
Topic: Easy Way to Get Data?
Replies: 3
Views: 1525

Re: Easy Way to Get Data?

I couldn't get it to work w HTTPRequest> (SSL problems?). With IE you could eg extract using TXT and then simply parse the info out. IECreate>IE[0] IEShowIE>IE[0],1 Let>URL=https://eve-marketdata.com/api/item_prices2.txt?char_name=addict&type_ids=9941&station_ids=60003760&minmax=min&buysell=s IENavi...
by hagchr
Sun Mar 26, 2017 9:16 am
Forum: Technical / Scripting
Topic: RegEx 2 variables in same line
Replies: 12
Views: 4843

Re: RegEx 2 variables in same line

Hi again, originally you asked for RexEx, so I replied in RegEx. However, you could also solve the whole thing with a simple loop. If the data set is small then there is no performance difference and probably easier to follow for anyone not into RegEx. LabelToVar>Test,string Separate>string,CRLF,arr...
by hagchr
Sun Mar 26, 2017 8:09 am
Forum: Technical / Scripting
Topic: RegEx 2 variables in same line
Replies: 12
Views: 4843

Re: RegEx 2 variables in same line

Hi, You need to add a couple of lines to get the row numbers. As always there are different ways, but if we continue with RegEx, what you can do is to, for each match, do a new search from the beginning of the (full) string until the end of the match and simply count the number of end of lines/strin...
by hagchr
Tue Mar 07, 2017 9:02 pm
Forum: Technical / Scripting
Topic: AddDialogHandler>Dialog1,EDIT3,OnEnter = enter key press
Replies: 4
Views: 1735

Re: AddDialogHandler>Dialog1,EDIT3,OnEnter = enter key press

I had the same problem at one point and never could figure out how to avoid the annoying beeps that comes when you press ENTER in an Edit field. So instead I used a Memo field and removed the line break that comes when you press ENTER. See simple illustration below (I am sure it can be done easier b...
by hagchr
Mon Nov 07, 2016 10:25 am
Forum: Technical / Scripting
Topic: Trouble with variable expressions
Replies: 5
Views: 3796

Re: Trouble with variable expressions

Hi, I think your ELSE statement only refers to your final IF statement. This means that if one of your first IF statements triggers then the final IF will not, BUT the ELSE will, and thus will "kill" any previous matches. You can eg define a flag=FALSE in the beginning and set it to TRUE in each IF ...
by hagchr
Fri Nov 04, 2016 8:39 am
Forum: Technical / Scripting
Topic: strip 2+ spaces or more
Replies: 2
Views: 2428

Re: strip 2+ spaces or more

To replace one or more spaces with just one space you can eg do:

Code: Select all

Let>text=test 12 one world     ok    bye now
RegEx>%SPACE%+,text,0,m,nm,1,%SPACE%,text
MDL>text
Sign up to our newsletter for free automation tips, tricks & discounts