On Sat, Apr 27, 2013 at 2:15 PM, Oliver Sims <
[email protected]> wrote:
> Did I recently see a mention of a "Standalone ooDialog Launcher"?
> Or am I mistaken?
>
No, you are correct.
I have the implementation working in ooDialog 4.2.3, (in trunk.) It is
similar to rexxhide, but will also have some enhancements. Some of which
may be ooDialog specific.
Some examples:
C:\work.ooRexx>oodialog -v
ooDialog 4.2.3.9173
C:\work.ooRexx>ooDialog \rexx\ooRexx\samples\oodialog\oograph.rex
C:\work.ooRexx>
The second command line above launches oograph.rex without a console.
Which, since I am running it from a command prompt doesn't make much
difference. But if it were launched through Windows Explorer, there would
not be that annoying command prompt window opening up.
C:\work.ooRexx>oodialog --help
The ooDialog executable is a stand alone interface to run ooDialog
programs, or to optionally provide other ooDialog services and
information.
Syntax:
ooDialog [option flags] [programName] [arg1 arg2 ... argN]
If no arguments are given, this help is shown. All option flags start
with the '-' character. The first argument that does not start with
the '-' character is taken to be the name of an ooRexx program to be
executed. All arguments following programName are passed as arguments
to programName. When programName is executed, it is executed with no
console window. This is similar to rexxHide.
option flags:
-h Show the short help text.
/? Same as -h.
-H Show this, the long, help text.
--help When run from a console window, show the long help.
-s Display the ooDialog Setup dialog.
-v Print the short version string.
-V Print the long version string.
--version If from a console window, print the long version string.
programName:
The first argument that does not begin with '-' is taken as the name
of a Rexxx program to be executed. The program is executed without
creating a console window. This implies that say, pull, and trace
statements have no effect.
arg1 ... argN:
Arguments following the perceived program name are passed on as
arguments to programName
C:\work.ooRexx>
The -s option displays a set up dialog that allows you to configure
ooDialog "related" things. Currently the only "thing" is associating file
types with ooDialog.exe. So for instance you could associate the .ood
extension with ooDialog.exe. Then, if you double click on a file, say,
oograph.ood, it would launch without a console.
What is enhanced about this, over say the ooRexx installer, is that you can
use set up to remove an association, add more than one association, modify
the existing associations, etc.. Another enhancement is that you can
specify the associations and related information to be for the current user
only, rather than system wide.
This is important on Windows Vista and later because the current user can
modify his / her association information without having administrator
privileges. Another feature is that, if you want to add / modify the
association for all users, on Windows Vista and later, you will get the
standard UAC prompt to elevate the process. Then if you are already in the
Administrator group, the process will be automatically elevated to run with
Administrator privilege, allowing you to modify the All Users settings.
Likewise, if you can supply an Administrator password, the process will be
elevated.
An unanticipated benefit to this last is that, having written the C / C++
code to do this, I will use that code to add methods to ooDialog to allow
the programmer to determine if the current process is being "RunAs
Administrator" or not, is "Elevated" or not, if the current user is in the
Administrator group, and the security level of the current process. Plus,
there will be a way to display the elevation prompt when needed, to allow
you to write ooDialog programs that "RunAs Administrator when needed.
One option will be to start an ooDialog program elevated from the start.
This would be something like:
C:\work.ooRexx>oodialog -UAC oograph.rex
In the above, if elevation was not needed, for instance if the command
prompt window was already being "RunAs" the oograph.rex program would just
execute. But, if the command prompt window just had standard user
privilege, then the typical UAC prompt would be shown. Which the user
could cancel of course and oograph.rex would not run. Or, if not canceled,
the program would run with Administrator privilege.
All of that will allow you to write ooDialog applications that work with
UAC in the standard way, in the way Windows 7 programs are supposed to work.
Other enhancements:
Under rexxhide, if an error condition is raised during the program
execution, it just ends and the user has no idea of what happened. Under
ooDialog.exe if an error condition is raised a dialog pops up displaying
the condition text, and the program ends.
The arguments to the ooDialog program will be supplied to the program as an
array of individual arguments in the .local environment. This is a feature
in ooRexx trunk that has not made it to an ooRexx release.
This will allow a number of possible future enhancements that are either
not fully thought out as of yet - or not thought of at all. For instance -
say you hate autodetection as much as I do, it might be possible in the
ooDialog set up configuration to write a value to the registry to turn the
default to OFF rather than ON. Or other types of configuration
information. When the ooDialog DLL, (which is the ooDialog framework
basically,) is loaded it would read its configuration information from the
registry and act accordingly.
Maybe a configuration option would be to "always use 1-based indexes."
Then in a ListView control, all indexes would be one-based instead of
zero-based as they are now.
--
Mark Miesfeld
------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
_______________________________________________
Oorexx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-users