Jump to content

using Nerocmd in a gui?


Rick
 Share

Recommended Posts

is there a prettier way of using Nerocmd in a gui rather than a horrid dos window?

thanks for any help

Build a GUI with a button on it. Create a function using run("nerocmd.exe etc"). Assign function to button and there you have it.


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Link to comment
Share on other sites

Build a GUI with a button on it. Create a function using run("nerocmd.exe etc"). Assign function to button and there you have it.

But i have about 600megs to burn, so i need to show some activity of what the burner is doing??

Who needs puzzles when we have AutoIt!!

Link to comment
Share on other sites

look up stdoutread, your could update the gui using that.

hmm nice idea, but how can i always retrieve the current line displayed by nerocmd in a doswindow?

For example; a way to detect the progress of burn in the dos window,

and what if it asks for a disk, or non-empty cd?

i'd be grateful for any help

Edited by Rick

Who needs puzzles when we have AutoIt!!

Link to comment
Share on other sites

This is a post with an simple example that puts the output of MKISOFS (or PING) in an edit box.

You'd need to test the entire StdoutRead-retrieved (StderrRead? I don't know enough about NEROCMD...) data on each pass of the GUI loop for messages, or just provide the non-interactive flag in your NEROCMD command line so that it would either succeed or fail...

Yes yes yes, there it was. Youth must go, ah yes. But youth is only being in a way like it might be an animal. No, it is not just being an animal so much as being like one of these malenky toys you viddy being sold in the streets, like little chellovecks made out of tin and with a spring inside and then a winding handle on the outside and you wind it up grrr grrr grrr and off it itties, like walking, O my brothers. But it itties in a straight line and bangs straight into things bang bang and it cannot help what it is doing. Being young is like being like one of these malenky machines.

Link to comment
Share on other sites

A nice idea , alas i cant seem to get just the last line to be read (ie: the %indicator) surely someone has automated nerocmd in a gui before?? if not i'll have to keep persevering, thanks for any help guys

Who needs puzzles when we have AutoIt!!

Link to comment
Share on other sites

Hi Rick, I don't know if you are doing the script to learn more about Autoit but, if you only want a gui that work with NeroCmd.exe then take a look to this webpage and download ImgTool Burn.

Keep in mind that you need nero installed otherwise NeroCmd.exe won't work, it used NeroApi.dll...

AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line
Link to comment
Share on other sites

Hi Rick, I don't know if you are doing the script to learn more about Autoit but, if you only want a gui that work with NeroCmd.exe then take a look to this webpage and download ImgTool Burn.

Keep in mind that you need nero installed otherwise NeroCmd.exe won't work, it used NeroApi.dll...

Yeah i'm doing a script that if Nero exists on the intended's pc then use nerocmd.exe to burn, however, all i want to do, and what seems the most difficult bit, is to not show a dos window, yet have the output in a gui window for any reponses should nerocmd require them, everything else is working fine except for hiding of the dos window and actioning any commands it asks for

Edited by Rick

Who needs puzzles when we have AutoIt!!

Link to comment
Share on other sites

It is kind of hard to help you with out the script or a piece of the script but, I assuming that you are using the lates AutoIt Beta 1.1.93 If you are not then you can get it here.

all i want to do, and what seems the most difficult bit, is to not show a dos window, yet have the output in a gui window for any reponses should nerocmd require them

Im also assuming that you are using RUN() function to execute NeroCmd.exe if that is the case all you have to do so the dos windows won't show up is change @SW_SHOW for @SW_HIDE and if you use $STDOUT_CHILD you will be able to capture the output and displayed on your gui. This is a small example:

#include <Constants.au3>
#include <GUIConstants.au3>

;Generated with Form Designer preview
$Form1 = GUICreate("Dir C:\", 317, 334, 192, 125)
GUICtrlCreateLabel("Run Dir C:\*.* Output", 96, 8, 104, 17)
$Edit1 = GUICtrlCreateEdit("", 8, 40, 297, 241, -1, $WS_EX_CLIENTEDGE)
$Button1 = GUICtrlCreateButton("Start Dir", 60, 296, 75, 25)
$Button2 = GUICtrlCreateButton("Close", 148, 296, 75, 25)
GUISetState(@SW_SHOW)

While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE Or $msg = $Button2
        ExitLoop
    Case $msg = $Button1
        $foo = Run(@ComSpec & " /c dir C:\*.*", @SystemDir, @SW_HIDE, $STDOUT_CHILD)
        While 1
            $line = StdoutRead($foo)
            If @error = -1 Then ExitLoop            
            GUICtrlSetData($Edit1, $line)
        Wend
            
    Case Else
    ;;;;;;;
    EndSelect
WEnd
Exit

I hope this will help you.... :P

AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line
Link to comment
Share on other sites

A nice idea , alas i cant seem to get just the last line to be read (ie: the %indicator) surely someone has automated nerocmd in a gui before?? if not i'll have to keep persevering, thanks for any help guys

This is another thread on a similar subject, in this case irregularity because of the way that the edit box dealt with characters in the output and/or difference in the way that the output was buffered when AutoIt was connected to the child process's STDOUT; the % progress output appeared all in a blurt when the process ended rather than as a steady progress while it ran... Are you seeing one or both of these behaviors with NEROCMD.EXE?

Yes yes yes, there it was. Youth must go, ah yes. But youth is only being in a way like it might be an animal. No, it is not just being an animal so much as being like one of these malenky toys you viddy being sold in the streets, like little chellovecks made out of tin and with a spring inside and then a winding handle on the outside and you wind it up grrr grrr grrr and off it itties, like walking, O my brothers. But it itties in a straight line and bangs straight into things bang bang and it cannot help what it is doing. Being young is like being like one of these malenky machines.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...