Search found 268 matches

by hagchr
Mon Jul 08, 2019 7:13 pm
Forum: Technical / Scripting
Topic: Return Value Given Code
Replies: 3
Views: 127

Re: Return Value Given Code

I feared one of those mega sheets with a lots of data which would have "clogged" any array. But if your excel sheet is simple with just the table and not too many rows then I think your solution is better.
by hagchr
Mon Jul 08, 2019 6:05 pm
Forum: Technical / Scripting
Topic: Return Value Given Code
Replies: 3
Views: 127

Re: Return Value Given Code

Hi, There are many ways to solve this, see one example below. Using VBS, the excel file is opened and the range containing the company data is copied to the clipboard and assigned to a variable. Then, based on the company id in question, the name is looked up. To use the example, you just need to ch...
by hagchr
Wed May 15, 2019 12:33 pm
Forum: General Discussion
Topic: Position of spaces
Replies: 14
Views: 986

Re: Position of spaces

I think you need to specify that you want the second regex to be case sensitive (ie A and a are not the same). You do that by adding the modifier (?-i) to the beginning of the pattern, ie change to Let>pattern=(?-i)[^a-z ] (?-i really means turn off case insensitivity) You can also search for all th...
by hagchr
Sat Apr 27, 2019 8:12 am
Forum: Technical / Scripting
Topic: Excel Trouble
Replies: 9
Views: 699

Re: Excel Trouble

It seems to work if the file was openend using XLOpen>, so that may be the requirement. This works for me:

Code: Select all

XLOpen>C:\Users\Christer\Desktop\CHTestGET.xlsx,1,xlBook0
XLGet>C:\Users\Christer\Desktop\CHTestGET.xlsx,xlBook
XLGetCell>xlBook,Sheet1,1,1,strCell
MDL>strCell
by hagchr
Mon Dec 03, 2018 3:57 pm
Forum: Technical / Scripting
Topic: Mousemove+Animation>ImagePos Help
Replies: 5
Views: 541

Re: Mousemove+Animation>ImagePos Help

XArr is the name of an array which contains (possible) multiple values. These values are then referred to by using XArr_0, XArr_1, XArr_2, ... etc. depending on what findimagepos> finds. So in findimagepos> you use XArr and YArr. When you want to refer to the results in other places/comparisons you ...
by hagchr
Mon Dec 03, 2018 8:17 am
Forum: Technical / Scripting
Topic: Mousemove+Animation>ImagePos Help
Replies: 5
Views: 541

Re: Mousemove+Animation>ImagePos Help

Hi, one thing that stands out is that your XArr and YArr resulting from FindImagePos> are really arrays and you also need to use an index, eg XArr_0 for the first match. So try %XArr_0% and %YArr_0% instead of %XArr% and %YArr%.
by hagchr
Mon Nov 05, 2018 10:42 am
Forum: Technical / Scripting
Topic: Select an item in ListBox
Replies: 7
Views: 633

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: 633

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: 2513

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: 426

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: 426

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: 624

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: 3863

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: 956

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: 1353

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.