Visula FoxPro 9 application runs application and wait for finish using command
RUN openssl.exe ... parameters
multiple times.
This causes ugly blank screen flashing.
How to remove blank screen flash ? how to run application miniized ?
Which is exact replacement of RUN command for this ?
Can shellexecute or Ed Rauh API_APIRun class used or is there other simple solution ?
I use API_APPRUN by the late, great Ed Rauh.
You can find the code here:
https://www.universalthread.com/ShowHeaderArticleOneItem.aspx?ID=7789
Below is the basic usage. I created a visual class library (VCX) using Ed's code. I then dropped the class on a vfp form with the name of "apprun".
lcCmdLine = "openssl.exe ... parameters"
thisform.apprun.init(lcCmdLine)
thisform.apprun.LaunchAppAndWait()
API_APPRUN is clean and should work as you expect.
Related
If I try to start debugging through the command "Open" of x64dbg, debugging stops without ever starting and a series of missing DLL errors are shown on the screen.
If I just open the program from WIN and THEN I use the attach command by selecting the process, debugging works.
Unfortunately I wanna "investigate" from the moment the program starts and not when it is already started.
How can I solve it ?
You need some anti-anti-debugging plugins (such as ScyllaHide) for x64dbg mentioned in this page to counter anti-debugging attempts and do some patching if needed:
https://github.com/x64dbg/x64dbg/wiki/Plugins
I have an Applescript that runs fine on my Macbook Retina but fails on a Mac Mini.
Both are running MacOS 10.9.2.
After peeling the onion a bit I'm able to reproduce the problem with a one-line Applescript:
tell application "MidiPipe" to activate
On the Mini that throws the error:
An error of type -10810 has occurred.
On the Macbook the MidiPipe application opens.
MidiPipe works normally on the Mini when started from the Finder or from Launchpad.
Google provides no insight into this error.
Well, I found this: http://www.thexlab.com/faqs/error-10810.html and this: http://osxdaily.com/2010/02/09/mac-error-10810/ and this: http://forums.adobe.com/thread/1389805 . At least one of these suggests a RAM problem.
But just to make sure you've tried every weird variation, have you tried the following:
1) using a full path:
tell application "Full:Path:To:MidiPipe.app" --(probably "YourHDName:Applications:MidiPipe.app"?
2) using an actual tell block:
tell application "MidiPipe"--or full path
activate
end tell
3) using the Finder:
tell application "Finder" to open "Full:Path:To:MidiPipe.app"
4) using shell:
do shell script "open /Applications/MidiPipe.app"
?
After looking at the links in CRGreen's answer, it looks like this is likely being caused by the process table being full on the mini. This, in turn, prevents any new applications from opening. According to The X Lab:
Error -10810 is a Launch Services result code indicating an unknown error. One cause of this error is that the Mac® OS X process table is full. When the process table is full, new (not currently running) applications cannot be opened until another running application ends. Programming errors in third-party applications can fill-up the process table, leading to the -10810 error when opening an application.
I would start by restarting the mini to see if that clears the process table, allowing you to to start MidiPipe.
If that doesn't work, you should look at your Activity Monitor to see if there is a specific program filling up your process table.
Could be nothing more than another mysterious grieving crap from Apple.
Today I have faced this myself, first time after using four different Mac Minis as build servers for Continuous Integration of Mobile apps for about two years or so.
My Jenkins runs the osascript from the bash script to build the app.
A few days ago the office experienced the power outage and all Macs went down. After powering them back on I have got this error at osascript execution on one of my Macs.
I have tried just to re-build - with the same result.
First thing I stumbled upon was https://jacobsalmela.com/2014/08/04/infamous-execution-error-error-type-10810-occurred-10810/ , but none of them applied to me.
Then I googled more general 10810 issue occurrences and went through couple of questions here on SO.
Still no luck.
Next I reached to the server via SSH using PuTTY and tried telling Terminal to do the very basic script like
osascript -e 'tell application "Terminal"
activate
tell window 1
do script "counter=0; while true; do if [ \"$counter\" -gt \"10\" ]; then
break; else counter=$((counter + 1)); sleep 1; fi; done; exit;"
end tell
end tell'
This worked fine.
Then I tried to run the whole bash script that Jenkins used to execute. Everything went just perfect and the app was uploaded to HockeyApp as the result.
I came with the thought that the issue is that Jenkins runs it remotely on that Mac and finally I have tried just to re-build again and it magically worked fine this time.
No idea what it was, but since then I have performed three or more builds already and all of them were successful.
Note I haven't changed anything, and my script:
1) never used a full path;
2) always used an actual tell block;
3,4) nothing like that from the accepted answer was ever used.
So... Go away mysterious grieving crap! Go away! :)
According official manuals, i tested this code:
wxProcess * proc = wxProcess::Open("C:\\windows\\notepad.exe");
but this code doesn't work properly, i see working notepad process in System Manager, but there is no notepad windows and etc. Also if i start console application - no text neither in new console window nor in mine.
How to fix that?
Thanks!
If you need neither IO redirection nor process termination notification, the simplest way to launch a process is to use wxExecute with wxEXEC_ASYNC flag.
Provided code works fine for me with any other application, e.g. calc.
wxProcess * process = wxProcess::Open(wxT("calc"));
wxLogDebug(wxT("Process: %s"), process != NULL ? wxT("OK") : wxT("Error"));
Shows OK and calc window appears.
We use fluentmigrator and it wants a long for the migration number.
Normally I can just open the immedetiate window and type
System.DateTime.Now.ToString("yyyMMddhhmmss");
But sometimes it will say:
The expression cannot be evaluated while in design mode.
So I start debugging run the command again and get this error:
The expression cannot be evaluated while in run mode.
Edited to add
If I start debugging and hit pause and enter the command I get
Cannot evaluate expression because the current thread is in a sleep, wait, or join
If I start debugging hit a break point then it works but that is too many hoops to jump through and it has worked in the first scenario. It seems to build my project since if there were errors it wouldn't execute.
This is in visual studio 2010 pro.
Bonus points if one can tell me how to do this as a class template or maybe a powershell type thing?
I've tried the answer in Immediate Window, "The expression cannot be evaluated...." and selecting the project doesn't work. I don't get the > in the immediate window and if i put it before the command i get
Command "..." is not valid.
Edited To Add
I created this gist to do what I wanted.
https://gist.github.com/9ad816c2b8e56b57ef79
basically a powershell command to create a c# template with some crap filled in.
Why not just use PowerShell:
PS> [DateTime]::Now.ToString("yyyMMddhhmmss");
20120228043351
I'm not a visual studio user but this is how you can get the value with a PowerShell cmdlet:
Get-Date -Format yyyMMddhhmmss
You need to execute it in the third mode – Debug mode (paused in the debugger).
When the build fails, I'd like to execute a program that shoots me in the head with this. I've written the program already - I just need it to run when I break the build.
CCTray has the option to make a sound or icon - but not to run a file. Any simple ideas? I'd rather this not be an all day project. :)
CCTray allows you to run commands. In CCTry, go to File | Settings and then click on the Exec tab.
If you run Outlook, you can set up a rule that runs an application whenever you receive an email saying the build is broken. Just follow the rules wizard and you will find it (in Ootlook 2007 it's on the 3rd page of the wizard, in the select action part).
Cradiator has functionality to monitor build servers and do stuff when a build breaks. It doesn't have code to run an executable but it would be a cinch to download the code, change it and get what you want. Here's what I think is the quickest path to getting this done:
Download the source for Cradiator
Edit the DiscJockey.cs class
Add 1 line of code that starts your program (line 34) eg:
Configure Cradiator to monitor your build server (ie edit app.config and add your url) and run
if (newlyBrokenBuilds.Any())
{ // Add a line of code to start your program here eg
Process.Start("C:\\myprogram.exe");
}