Search found 6704 matches

by Marcus Tettmar
Tue Dec 10, 2019 8:06 am
Forum: Technical / Scripting
Topic: IECreate
Replies: 6
Views: 93

Re: IECreate

It might have worked first time because IE[1] equaled 1. Second time I presume IE[1] became 0 and you created a new instance called IE[2]. Instance 1 presumably no longer existed, but did first time around.
by Marcus Tettmar
Tue Dec 10, 2019 8:03 am
Forum: Technical / Scripting
Topic: Unable to Restore Image
Replies: 25
Views: 7193

Re: Unable to Restore Image

From the manual for LabelToVar, and also here: https://www.mjtnet.com/manual/labeltovar.htm : The optional parameter WantLineBreaks can be set to 0 to force LabelToVar to discard line breaks. By default line breaks are retained (WantLineBreaks=1). Ommitting WantLineBreaks or setting it to anything o...
by Marcus Tettmar
Mon Dec 09, 2019 5:08 pm
Forum: Technical / Scripting
Topic: Gettextinit freezes debugger
Replies: 2
Views: 67

Re: Gettextinit freezes debugger

I cannot replicate. Would kind of help to know which Macro Scheduler version and which version and bitness of Windows.
by Marcus Tettmar
Mon Dec 09, 2019 2:56 pm
Forum: The Water Cooler
Topic: Enhancement Suggestion
Replies: 5
Views: 63

Re: Enhancement Suggestion

I would like a set of new functions that do what I was thinking regardless of what I wrote. I have an immediate need for this new functionality. Thank you for your thoughtful consideration of my request, Dick Our automated suggestion tracker already detected what you were thinking, came up with a s...
by Marcus Tettmar
Mon Dec 09, 2019 2:53 pm
Forum: Technical / Scripting
Topic: WaitWindowOpen_class
Replies: 1
Views: 38

Re: WaitWindowOpen_class

You could use GetWindowNames which returns captions, handles and classnames. Then see if the classname you want is in the list. That would tell you if it exists. If you then want to see if it's visible or whatever you could use the handle to drill deeper.
by Marcus Tettmar
Mon Dec 09, 2019 2:52 pm
Forum: Beginners
Topic: Click Drag Mouse
Replies: 1
Views: 34

Re: Click Drag Mouse

Essentially it's just:

LDown
MouseMove>endX,endY
LUp

But you may need the interim movements. See:
viewtopic.php?f=2&t=9264&p=40516&hilit= ... use#p40516
by Marcus Tettmar
Wed Jul 31, 2019 11:04 pm
Forum: General Discussion
Topic: Connection to SAP
Replies: 1
Views: 845

Re: Connection to SAP

If the code runs in a regular .vbs file outside of SAP then yes. But if the code accesses properties only exposed by the container - SAP - then probably not.
by Marcus Tettmar
Fri Jul 12, 2019 6:38 am
Forum: Technical / Scripting
Topic: Hello, question
Replies: 1
Views: 183

Re: Hello, question

Yes, press left and right mouse buttons together to copy content of cursor monitor to clipboard.
by Marcus Tettmar
Fri Jul 12, 2019 6:37 am
Forum: Technical / Scripting
Topic: How to change parameter in a Macro using the Dialog
Replies: 2
Views: 268

Re: How to change parameter in a Macro using the Dialog

Look at the topic Command Line Options in the help file. This shows how you can pass parameters as variables into macros when you run them.
by Marcus Tettmar
Fri Jul 12, 2019 6:36 am
Forum: Technical / Scripting
Topic: FindImagePos then LClick (works great), but if statement to not click again
Replies: 1
Views: 154

Re: FindImagePos then LClick (works great), but if statement to not click again

Try changing the matching method from CCOEFF to EXACT so that it does an EXACT match. At the moment it sounds like it is seeing the two as the same thing - CCOEFF is statistical pattern matching and is designed to be tolerant. The purple version is similar, so it sees it as the same thing. That is h...
by Marcus Tettmar
Mon Jul 01, 2019 2:39 pm
Forum: Technical / Scripting
Topic: Return partial variables within string
Replies: 5
Views: 460

Re: Return partial variables within string

PepsiHog's solution still works. It doesn't care what the separator is.
by Marcus Tettmar
Mon Jul 01, 2019 2:37 pm
Forum: Technical / Scripting
Topic: Copy last three characters of a variable to a new variable
Replies: 5
Views: 405

Re: Copy last three characters of a variable to a new variable

You probably have previous programming experience which will be a benefit for logic but a deficit for syntax. You need to study posted scripts and get a feel for available commands and Macro Scheduler syntax which does not allow multiple functions on the same line. CGooley's syntax is correct - it ...
by Marcus Tettmar
Mon Jul 01, 2019 2:35 pm
Forum: Technical / Scripting
Topic: Copy last three characters of a variable to a new variable
Replies: 5
Views: 405

Re: Copy last three characters of a variable to a new variable

Here is how I am currently trying to do this: GetClipBoard>filename Let>filenamelength={length(%filename%)} Let>count=filenamelength-3 Let>at={Pos(" ",%filename%)} Let>branch={copy(%filename%,count,%at%-1)} message>branch Branch should return the last 3 characters, but only does this if I specify m...
by Marcus Tettmar
Mon Jul 01, 2019 12:10 pm
Forum: Technical / Scripting
Topic: Executing or opening an invalid file path
Replies: 5
Views: 391

Re: Executing or opening an invalid file path

I would just check that the file exists before doing anything:

Code: Select all

SRT>Open_Sub
  IfFileExists>file
    ExecuteFile>file
  Else
    MessageBox>Please enter a valid file first!
  Endif
END>Open_Sub
by Marcus Tettmar
Mon Jun 24, 2019 11:44 am
Forum: Technical / Scripting
Topic: vbs
Replies: 10
Views: 588

Re: vbs

Your code should be: VBStart Option Explicit Sub MoveFolder(Source,Dest) Dim fso Set fso = CreateObject("Scripting.FileSystemObject") fso.MoveFolder Source, Dest End Sub VBEND //C:\Users\Felix The Cat\Desktop\Move this folder //C:\Users\Felix The Cat\Desktop\Move here let>Source=%Desktop_Dir%\Move t...