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
 Forum for Origin C
 Keyboard input

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
gilles wat Posted - 01/22/2004 : 11:41:36 AM
Hi,
When a origin C programm runs, the mouse or the keyboard are disable.
During an acquisition from a GPIB port, I cannot change, for exemple, a gain scope without breaking the process.
How can I read a character from the console ( in MSN C++ _getch) or use a click on a UIM radio button.
(Origin 7 SR4)
Thank you
Gilles

1   L A T E S T    R E P L I E S    (Newest First)
cpyang Posted - 01/22/2004 : 5:23:27 PM
This is tough, multithreading support for Origin C would be required to do what you want. Until then, you can insert the LabTalk wait command to allow Origin to run during that wait time. The follow code shows how the DataDisplay bar will continue to be updated until you type

junk=1;

into the script window.




void test(int nMax = 100000)
{
string str;
for(int ii = 0; ii < nMax;ii++)
{
str.Format("%d:Please set Junk to 1 to stop", ii);
SetDataDisplayText(str);
double vv;
LT_get_var("junk", &vv);
if(vv > 0)
break;

LT_execute("sec -p 0.2"); // wait 0.2 sec to let Origin run/process its messages.
}
if(ii < nMax)
out_str("user has stopped the loop from LabTalk");
}





CP



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