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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 LabTalk Forum
 Script waits for keyboard/mouse input
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

wallacej

UK
Posts

Posted - 06/14/2005 :  05:08:07 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (7.5):
Operating System: win2K

Hi

I have a LabTalk script which generates a report containing graphs etc.
The problem: Part of the way through the report generation the script halts and does not continue until the user moves the mouse or hits a key on the keyboard. I am finding this particularly baffling because the problem occurs on only one of 8 PC's using the same script.

The script halts just before a window is displayed allowing the user to import an image, here is that section of script:

label -d 930 610 -s -n date %M %L %O;
system.font.labelSize = 22; // change back to normal font size after auto text insertion

//Open browse window for user to select an image
run.section(imgfile,ImportImage);
if( BMP1.Width!=0/0 ) { //test condition for existence of image (has user clicked cancel?)
BMP1.Width = 1850;
BMP1.Height = 1844;
BMP1.Left = 4554;
BMP1.Top = 2668;
}

Any ideas why?

Thank You in advance

Wallace

wallacej

UK
Posts

Posted - 07/25/2005 :  12:12:37 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi

I've been asked to look at this problem again and I have a bit more information.

As I stated I have several machines with this script running. I noticed that only machines with SR 2 have the problem (SR 2 is the lowest release that I have), the other systems on SR 4 do not have the fault.

I updated one of the machines from SR2 to SR5 but this did not resolve the issue.

My thoughts are that there is a bug somewhere in the script that has been resolved after SR2 but maybe I have modified the file containing the bug which means that it was not updated during the deployment of the patch. I have thoroughly compared the file imgfile.ogs (which i have modified) and it is identical on both systems with SR 2 and SR 4.

I hope that this information may trigger some ideas.

Thank You

Wallace

Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 07/25/2005 :  3:59:08 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Wallace,

Your reference to imgfile.ogs rang a bell so I located one of your earlier posts in which I suggested two alternative modifications to the [ImportImage] script section...

http://www.originlab.com/forum/topic.asp?TOPIC_ID=3981

Was the first suggestion incorporated on any of the problem PCs? If so, I see a potential problem in the following loop...

for(i=1;i>0;i++)
{
%A=%[%Z,#i]; if(%A=="") break;
if(%A!="JPG") %L=%L %A;; // double semicolon!!
}

Double semicolons can have unpredictable results so I suggest you remove the extra semicolon where noted. Just a hunch, but maybe worth checking out.

...And don't forget to look for imgfile.ogs on the User path. If you distribute your tools via OPK and included a modified version of the file then it would end up in the User Files folder. That would explain why the version in the program folder was unchanged.

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 07/25/2005 4:26:57 PM
Go to Top of Page

wallacej

UK
Posts

Posted - 07/26/2005 :  08:41:30 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Mike

Yes the modification to the imgfile.ogs file is on every system. however I did not include the double semicolon because I assumed that it was a typo.

Also, I ran a search and the imgfile.ogs file is located in the OriginPro75 directory only. I have compared the file from a problem PC and a working PC and they are identical. Do you have any more suggestions? My only thoughts were further files called from the imgfile.ogs file but I cannot see anything.

Thank You

Wallace

Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 07/26/2005 :  10:50:31 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Glad you caught the typo. I'd hate to think I was the cause of your problems.

Your script at the top draws a label before invoking the file dialog. Does that label appear before the "pause"? (Perhaps the problem occurs before the imgfile script.)

Mike Buess
Origin WebRing Member
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000