Display a progress bar page for a command line operation using INNOSETUP [duplicate] - command-line

This question already has answers here:
How to manipulate progress bar on Inno Setup Run section?
(2 answers)
Closed 2 years ago.
Is there a possibility to link the operation running on a command line to the innosetup page ?
Background :
I have a huge.zip file that has to be extracted during install operation. To achieve this i send commands(commandline args) from the InnoSetup. The extraction process runs in the background i.e on the command prompt. But there is no way for an user to know whats actually happening.
Required Solution
I would like to have some linking between these two parallel operations.
i.e somehow able to link the progress of the current operation (extraction of the files) from the command-line and display it to the user on the progress page during installation.
i.e i should be able to retrieve the remaining time / % operation completed to display it finally on the progress page.
I would greatly appreciate if anybody has any ideas for achieving the above
Cheers

This isn't really possible in Inno using a command line application as it (natively) has no way to read data from it.
You may have more luck creating a COM object that can fire events or make windows message callbacks that you then use to update the progress bar.

Related

VSCode exits while debugging a flutter app

It seems like vscode is trying to present data in the Locals and/or Watch for a large object but after about 10 seconds, it will kill the app and give the message "Exited (sigterm)" in the debug console. I can pinpoint it to one example where I break on a line immediately after this line:
Uint8List inputBytes = Uint8List.fromList(List.filled(100000000, 0));
I can see "Locals" spinning around but nothing happens and then the app terminates. Is there a setting that can prevent this somehow? Maybe it can cap the represented data at a certain length instead of trying to print it all out?
(I believe this is a vscode specific problem because when I repeat these steps in Android Studio, it doesn't have this issue)
Thanks.
This is a bug in the debug adapter. It should know this is a list and fetch a paged view of the elements, but it's currently fetching them all. For me it doesn't crash, but it also doesn't respond within several minutes.
I'm working on a fix that will let VS Code page through the data:
This will ship in an upcoming Dart/Flutter SDK release.

How to debug ExecuteFunctions for word add-in?

I'm implementing a functionality which runs in background(without Taskpanel), where I can POST the word document data to REST API through the ExecuteFunctions. my question here is How can I debug the Function file? I tried printing through the console logs and also tried to debug through F12 and Visual studio tools, but didn't work. I have created word add-in using YO Office generator.
To answer the question as is, simplest way of debugging the functions is through the Web experience (https://onedrive.live.com), where they will print stuff on the console.
You should probably check out this answer though: Run add-in without showing taskpane?
You really can't run background tasks without having a TaskPane. Functions are meant to just plainly execute something and exit. That means; upon clicking the Function button, you can make a request and upload some data, but you can't really keep a connection open and upload periodically after just one click.

PS2EXE and Active Directory Integration

So I've tried wrapping one of my scripts into an exe using PS2EXE, and it works great! But for some reason, when using AD functions, it gives me a whole bunch of background text which makes interacting with the script nearly impossible! See the pictures below:
I've done my research, and have only found one other forum where anybody had this issue, and there was no resolution. This only seems to happen when using AD functions, and after importing the AD Module. I've tried resetting all of my error and warning action preferences and it does not affect this in any way. I think it's just informative, but it makes it difficult to see the text requiring acknowledgement or input unless I go back and change the foreground color on all of my write-host text.
Has anybody seen this before, or have any ideas on how to suppress the informative output?
Thanks!
I am not familiar with PS2EXE but looking at the screenshot, I think it's echoing data from the progress stream. Two things I would recommend:
If you're not using the AD drive (AD:> in PowerShell), disable it. It takes forever to load and that's what's generating the stuff on the screen. Put this line at the top of your script to do so:
$Env:ADPS_LoadDefaultDrive = 0
You can hide progress info in general in your script by adding this line:
$ProgressPreference = SilentlyContinue

Visual Foxpro exe file not working

I am beginner in using Visual FoxPro. I am trying to create a simple application which contains a form with a few textboxes. The problem is that the application window does not appear when I run the executable file which I build.
The code for the program is:
PROCEDURE main_app
_SCREEN.Activate
_SCREEN.WindowState = 2
_SCREEN.backcolor = RGB(128, 128, ;
128)
_SCREEN.Caption = ""
_SCREEN.refresh()
SET TALK OFF
SET DELETED ON
SET EXCLUSIVE OFF
CLEAR ALL
CLEAR
CLOSE ALL
DO FORM simpleform LINKED
READ EVENTS
RETURN
*MESSAGEBOX('Msg')
ENDPROC
In the form I have a few textboxes and a button. When the button is clicked then some code is executed. If I run the application from the IDE everything works fine but if I create the executable this does not display any window, still the process appears in the task manager. If I uncomment the MessageBox then this will appear even if I run the exe file. I don't know a way to trace the problem outside the IDE, maybe there is still a library needed that I am not aware.
I am using Visual FoxPro 9.0
Would someone be able to help me out?
If you can provide me with a link to a very simple application exe which uses just one form and finishes when the form is closed I would very much appreciate it.
Thanks in advance
I tried creating a brand new project, new code and new form just as you described. I copied your code and ran, but it never displayed the form.
If this is the main app in your project, you don't need the initial
PROCEDURE main_app
just remove this line as there is nothing CALLING the "Main_App" and thus is never getting called to ultimately call your form.
Just comment it out, save your project and run it... See what you get, it SHOULD work.
** PROCEDURE main_app
The problem was that I did not set the screen visibility to true.

how can I improve iPhone UI Automation?

I was googling a lot in order to find a solution for my problems with UI Automation. I found a post that nice summarizes the issues:
There's no way to run tests from the command line.(...)
There's no way to set up or reset state. (...)
Part of the previous problem is that UI Automation has no concept of discrete tests. (...)
There's no way to programmatically retrieve the results of the test run. (...)
source: https://content.pivotal.io/blog/iphone-ui-automation-tests-a-decent-start
Problem no. 3 can be solved with jasmine (https://github.com/pivotal/jasmine-iphone)
How about other problems? Have there been any improvements introduced since that post (July 20, 2010)?
And one more problem: is it true that the only existing method for selecting a particular UI element is adding an accessibility label in the application source code?
While UI Automation has improved since that post was made, the improvements that I've seen have all been related to reliability rather than new functionality.
He brings up good points about some of the issues with using UI Automation for more serious testing. If you read the comments later on, there's a significant amount of discussion about ways to address these issues.
The topic of running tests from the command line is discussed in this question, where a potential solution is hinted at in the Apple Developer Forums. I've not tried this myself.
You can export the results of a test after it is run, which you could parse offline.
Finally, in regards to your last question, you can address UI elements without assigning them an accessibility label. Many common UIKit controls are accessible by default, so you can already target them by name. Otherwise, you can pick out views from their location in the display hierarchy, like in the following example:
var tableView = mainWindow.tableViews()[0];
As always, if there's something missing from the UI Automation tool that is important to you, file an enhancement request so that it might find its way into the next version of the SDK.
Have you tried IMAT? https://code.intuit.com/sf/sfmain/do/viewProject/projects.ginsu . It uses the native javascript sdk that Apple provides and can be triggered via command line or Instruments.
In response to each of your questions:
There's no way to run tests from the command line.(...)
Apple now provides this. With IMAT, you can kick off tests via command line or via Instruments. Before Apple provided the command line interface, we were using AppleScript to bring up Instruments and then kick off the tests - nasty.
There's no way to set up or reset state. (...)
Check out this state diagram: https://code.intuit.com/sf/wiki/do/viewPage/projects.ginsu/wiki/RecoveringFromTestFailures
Part of the previous problem is that UI Automation has no concept of discrete tests. (...)
Agreed. Both IMAT and tuneup.js (https://github.com/alexvollmer/tuneup_js#readme) allow for this.
There's no way to programmatically retrieve the results of the test run. (...)
Reading the trailing plist file is not trivial. IMAT provides a jUnit like report after a test run by reading the plist file and this is picked up by my CI Tool (Teamcity, Jenkins, CruiseControl)
Check out http://lemonjar.com/blog/?p=69
It talks about how to run UIA from the command line
Try to check the element hierarchy, the table can be placed over a UIScrollView.
var tableV = mainWindowTarget.scrollViews()[0].tableViews()[0].scrollToElementWithName("Name of element inside the cell");
the above script will work even the element is in 12th cell(but the name should be exactly the same as mentioned inside the cell)