The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 Script not well working

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
bedibra Posted - 08/25/2017 : 12:16:55 PM
Dear all,
I have made a script which is supposed to lunch from graph (after click on text in the graph).

range rwi=[book1]index!1;
window -a graph1;
count=0;
dotool 3;
dotool -d;
def pointproc {
count++;
if(count == 3) dotool 0;
rwi[count] = index;
}
def quittoolbox {
window -a book1;
page.active$ = results;
}

The problem is that it is not working every time I click on it (not getting the index values when I click on the graph), whereas when I lunch the script from the command window it works well.
Can someone tell me what could be the problem ?
Thanks
2   L A T E S T    R E P L I E S    (Newest First)
bedibra Posted - 08/25/2017 : 7:43:39 PM
Indeed this works better :) :
window -a graph1;
count=0;
dotool 3;
dotool -d;
def pointproc {
count++;
if(count == 3) dotool 0;
range rwi=[book1]index!1;
rwi[count] = index;
}
def quittoolbox {
window -a book1;
page.active$ = results;
}


quote:
Originally posted by Hideo Fujii

Hi bedibra,

I cannot explain well, but it seems relating to the matter of scope.
Try to move the range declaration inside the def block for the macro declaration.

--Hideo Fujii
OriginLab

Hideo Fujii Posted - 08/25/2017 : 3:04:34 PM
Hi bedibra,

I cannot explain well, but it seems relating to the matter of scope.
Try to move the range declaration inside the def block for the macro declaration.

--Hideo Fujii
OriginLab

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000