Is it possible to give beep sound using progress 4GL? - openedge

Is it possible to give beep sound using progress 4gl? If yes can you please help to share a demo program which plays beep sound if any errors? I am new to progress and it will be helpful.

take a look at the BELL statement
but you can not specifikate a sound file
it's the windows error sound

Assuming that you are using a Progress OpenEdge client that can use .Net classes, you can use the .Net console beep:
System.Console:Beep().
To play any wav you can use the SoundPlayer class:
def var o as System.Media.SoundPlayer.
o = new System.Media.SoundPlayer( 'c:\windows\media\chimes.wav' ).
o:PlaySync().

Related

How can I use the PCL visualizer (Windows) and avoid the WM_QUIT message closing my application when the visualizer closes

I am using the PCL visualizer saveScreenshot() to create a png of my pointcloud. That's all working, but when I call viewer.close(), the Windows implementation calls TerminateApp which sends a WM_QUIT that closes my application. What I want to happen is the visualizer window close and have my application continue.
I don't need any user interaction with the visualizer window. I'm just using it to get the .png from the pointcloud.
I tried initializing the visualizer without an interactor, but saveScreenshot() doesn't work with a null interactor.
Is there some way to set up the interactor without a message proc?
You can use pcl::io::savePNGFile() to export a PNG directly from your program
Can savePNGFile use camera intrinsics? Would I add camera intrinsics to the cloud to get the PNG I want?

How do I hold a specific position using Zaber Console Script?

I am trying to write a simple script using Zaber Console.
I basically have to move my robot arm to a certain position (i.e. 43.9mm) hold the position for 10 minutes and go back to the home position.
I found all the command for moving (fast/slow and with a certain acceleration) but I can't undestand how to tell the machine to stay at 43.9mm poistion for 10 minutes.
Any suggestions ?
I am coding in "this language":
if(PortFacade.Port.IsAsciiMode)
{
Conversation.Request("move abs", 881890);
Conversation.PollUntilIdle();
}
else
{
Conversation.Request(Command.MoveAbsolute, 881890);
}
Thanks a lot.
Riccardo
For your reference, if you are coding through the script editor in Zaber Console, we offer a scripting page which covers C#, Javascript, VP, as well as Python. You can find the scripting page here: http://www.zaber.com/wiki/Software/Zaber_Console/Scripting
The language in your script is using C#, and a quick program to execute what you'd like to do can be written like this:
#template(simple)
var device1 = PortFacade.GetConversation(1); // This is assuming your device
// is device 1 in the chain.
// The device list in Zaber Console will let you know the device number.
// Alternatively, you can use the renumber command to change the device number.
device1.Request("move abs 100000"); //the data value for 43.9 mm will vary
// from device to device. The formula would be 43.9[mm]/ Microstep size[mm] = Data value
// The microstep size can be found on the product page at www.Zaber.com, or
// email Contact#Zaber.com
Sleep(5000); //Sleep is in milliseconds
device1.Request("move abs 0");
If you have any questions, please don't hesitate to email Contact#Zaber.com.
Regards,
Albert

Is it possible to transfer sqlite file to watch os 2

Can any one help me out on this problem. I am struggling to transfer the sqlite to watch os 2. If you have any example share with me or please give your suggestion on this
Have not tried this for sqlLite files but works with audioFiles.
What I did is:
Turn ON App Group both on watch extension and main project.
Place file in App Group Container
// I create the file there so my code is
NSURL * urlOut = [[NSFileManager defaultManager] containerURLForSecurityApplicationGroupIdentifier: APP_CONECTIVITY_ID];
urlOut = [urlOut URLByAppendingPathComponent:#"myfile.wav"];
Send via WCSession sendMessage the link, need to send as string so you will send urlOut.absoluteString.
Profit?
You should be able to use stuff like sendMessageData //reading the file as date beforhand.
and there is also this WCSessionFileTransfer.
But I haven't had a chance to try that yet.

progress bar while creating excel file asp.net

I've got a ASP.net page that create an excel file using eeplus library (http://epplus.codeplex.com/). my problem is that I create a really big file. It take times to be done and showed to the client. I search a way to show a kind of progressbar of the creation.
for the moment, the client click and wait til the file is created, so I cant really showed something.
What you're trying to do is actually pretty complicated. You might just want to show a spinning wheel gif or something and save yourself the headache.
However, if you're feeling adventurous, read on.
To use a progress bar, you need to create a way to measure how much % complete your task is. This usually involves some kind of incrementer that gets measured against the total number of rows/column/whatever that you're creating. I don't know what language you're using, so here's some pseudo to help you out:
var totalRows = 100;
var processedRows = 0;
var progress = 0;
while( processedRows < totalRows ){
Process_A_Row();
processRows++;
progress = processedRows / totalRows;
StoreProgressSomewhereForPolling();
}
So there's your basic mechanism for tracking progress. On the client, you'll need to set up a way to poll the value of the progress variable. This gets messy because you'll quickly learn that you need a way to isolate the progress variable for every individual request. Its up to you how to implement this -- there are lots of ways to do it. One solution I saw stored the progress value in a static dictionary keyed by username so that it could be easily polled by the client with webmethods.
A quick solution would be to use the Ajax.NET UpdateProgress control. Just display a GIF that spins while the server is processing.

VLC-Player in adobe Air App does not stop/quit

Well i have an adobe air , downloaded from below link.. it is wonderful app..
http://www.adobe.com/devnet/air/flex/articles/air_screenrecording.html
and this works fine. It captures my screen , record audio but it just does not stop or quit as vlc-player.exe continues to run in the task manager.
i tried lots of vlc- commands but it just does not stop once it starts capturing screen video.
I need help on it..
I know this is a old thread, but just in case someone wants to know...
You can't use rc-fake-tty because Windows doesn't support terminal. For Windows, tell VLC to run with only one instance, then send it the quit command as a separate NativeProcess call.
So, in the linked article, change the stopRecording() method to this:
public function stopRecording():void{
var startupInfo:NativeProcessStartupInfo = new NativeProcessStartupInfo();
startupInfo.executable = vlcFile;
var processArgs:Vector.<String> = new Vector.<String>();
processArgs.push("-I");
processArgs.push("rc"); //Remote control
processArgs.push("--one-instance");
processArgs.push("vlc://quit");
startupInfo.arguments = processArgs;
var killSwitch:NativeProcess = new NativeProcess();
killSwitch.start(startupInfo);
}
And make sure to add this:
processArgs.push("--one-instance");
To your initial screen record startupInfo in startRecording() method.
I quit using vlc for the same reason and started to write my recording application using .Net 4, but i am having less performance using c# now.
Edit:
VLC for windows does not support fake rc control so setting rc-fake-tty is useless. As the very last try, i wanna control is via socket. If you got it working this way, please make me informed.

Resources