AutoHotkey Community

It is currently May 25th, 2012, 9:03 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 189 posts ]  Go to page Previous  1 ... 7, 8, 9, 10, 11, 12, 13  Next
Author Message
 Post subject:
PostPosted: March 9th, 2007, 10:07 am 
Offline

Joined: February 12th, 2007, 7:54 am
Posts: 2462
BoBo wrote:
If not done already - wouldn't it make sense to provide it within a seperate post?

I've done it now.
It was just a variation of my script (:not in AHK) to convert between ANSI and UTF8.

Moderator: It is in this post


Report this post
Top
 Profile  
Reply with quote  
PostPosted: March 9th, 2007, 8:30 pm 
Offline

Joined: April 21st, 2006, 5:10 pm
Posts: 1
Location: Seattle, WA
Recently, I've created an application to perform the creation of the image and then burning the image to a CD. Prior to this point, I used the RunWait function and displayed the command-line box, but was interested in getting a more live update of the percentages from the command-line application so I could move the information to a UI component (System Tray,Progress Bar,etc.)

I attempted to use CMDret_RunReturn and CMDret_Stream but both of them have failed to give live updates of the percentages of one application. I get the impression it is the particular application that is causing me grief but wanted to see if I was at fault in my execution.

Oscdimg

Oscdimg is the offending application. It allows me to creates boot-able images for Windows Recovery (WinPE) environments. During the creation process a percentage value increases. However, I cannot capture the real-time value of that percentage.

CMDRunReturn Example:
Code:
Output := CMDret_RunReturn("oscdimg -n -h -m -lWinRe -betfsboot.com C:\ImageCreation\CDROM WinRe.ISO")
MsgBox, %Output%


Output shows only after the process is complete. The output shows the application header information and all the percentages as they were updated in the application.


CMDret_Stream Example:
Code:
Gui, Add, Edit, x10 y10 r20 w280 vTestEdit, %Output%
Gui, Show, w300 h300 Center, Example
CMDret_Stream("oscdimg -n -h -m -lWinRe -betfsboot.com C:\ImageCreation\CDROM WinRe.ISO","optional",A_WorkingDir)


CMDret_Output(CMDOut, CMDname="")
{
   global Output
   Output := Output "`n" CMDOut
   GuiControl,,TestEdit, %Output%
}


This will show the header information and then show 0% as the process starts but will not show any updated percentages through the process.

Is there an error in the execution of my code or are there issues with certain command-line application that make them unable to gather their output?

I appreciate the help and the assistance.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 10th, 2007, 7:13 pm 
Offline
User avatar

Joined: December 29th, 2004, 1:28 pm
Posts: 2541
@washboard, Sean - Thanks for the info and workaround :)

@burtlo - Thanks for the information and example. I'll have a look.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 5th, 2007, 1:26 pm 
Offline

Joined: July 15th, 2006, 1:30 am
Posts: 48
corrupt thanks for this wonderful function.

I have a minor question:
I want to open a telnet connection with my router (telnet router-ip).
But then I have to enter username and password, which I can't find a way to do it through CMD_ret.

I think you've already said that there is no STDIn but I just want a confirmation.

Also is it possible to run multiple commands from the first instance?
e.g if in the end I manage to log on on my router it would be good not to have to re-log on it for every command I have to put in.

Thanks in advance.

_________________
One hotkey to rule them all!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 5th, 2007, 2:39 pm 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
Quote:
But then I have to enter username and password, which I can't find a way to do it through CMD_ret.

You will have to create batch script, that executes your telenet connection and use some of the "console automatition tools". I don't remember what was the name for the Windows, but on Linux its known as expect.

So, this problem has nothing to do with CMDRet.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 5th, 2007, 6:34 pm 
Offline
User avatar

Joined: December 29th, 2004, 1:28 pm
Posts: 2541
XavierGr wrote:
I think you've already said that there is no STDIn but I just want a confirmation.
StdIn is planned for the next (and possibly final) release but it might be a couple weeks before its released. The next release may also fix a few issues with CMDret_Stream not producing all output when expected. If you need something sooner, the dll version of CMDret supports StdIn (and a few other options) and I think the set of functions that Sean is working on (StdoutToVar) might have an option to specify StdIn. Future versions of CMDret after the next release will likely be in the form of updates to the dll version except for bug fixes (if any). Although, it's tempting to reconsider this since the latest AutoHotkey release supports optional ByRef params...

XavierGr wrote:
Also is it possible to run multiple commands from the first instance?
e.g if in the end I manage to log on on my router it would be good not to have to re-log on it for every command I have to put in.

Thanks in advance.
It's not supported at the moment because of a lack of StdIn functionality but adding StdIn support to CMDret_Stream might provide some functionality for this. Thanks for the suggestion :) . majkinetor and a few others had also expressed an interest in being able to have similar functionality. I'll try and include the functionality in the next version.

Edit: added links to the other topics mentioned


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 19th, 2007, 7:36 pm 
corrupt wrote:
In the interest of efficiency and keeping somewhat up to date, these functions, CMDret and a few others will be updated to use the new numspagetti and numnuts functions, callbacks and other current features in the current beta once they are offically released :) .
We all are very impatient to see the result :D :D :D


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: June 20th, 2007, 12:56 am 
Offline
User avatar

Joined: December 29th, 2004, 1:28 pm
Posts: 2541
Supercalifragilistic wrote:
We all are very impatient to see the result :D :D :D
:lol: :) I'll see what I can do. I don't usually get much time to work on coding during the week due to my day job, family/kids, life in general... but I might have a chance to release one of them later tomorrow... :)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 20th, 2007, 4:32 am 
Impatient, certainly, but not avid. Take your time :!: :!: :!: :) :) :)


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: August 6th, 2007, 7:37 pm 
Offline
User avatar

Joined: December 29th, 2004, 1:28 pm
Posts: 2541
Supercalifragilistic wrote:
Impatient, certainly, but not avid. Take your time :!: :!: :!: :) :) :)
:lol: I guess I have so far... Sorry for the delay... If structs were implemented in AutoHotkey in a user friendly way (struct.member = "blah", myresult := struct.somemember), I would probably update this script (and release a few others) more often ;) ...


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 21st, 2007, 7:19 am 
Online
User avatar

Joined: December 26th, 2005, 4:40 pm
Posts: 8775
Dear corrupt, :)

Thank you for this wonderful utility. :D

I seek some advice from you.
I am polling per second my UPS ( with the CLI provided by the Vendor ) to retrieve line-in Voltage and Battery charge level and constantly update my always-visible GUI.

The Output of CLI is around 1K and a sample follows:
Code:
APC      : 001,038,1052
DATE     : Sun Oct 21 11:33:57 India Standard Time 2007
HOSTNAME : SKAN-PC
RELEASE  : 3.14.2
VERSION  : 3.14.2 (15 September 2007) Win32
UPSNAME  : SKAN-PC
CABLE    : USB Cable
MODEL    : Back-UPS ES 500
UPSMODE  : Stand Alone
STARTTIME: Sun Oct 21 09:05:13 India Standard Time 2007
STATUS   : ONLINE
LINEV    : 224.4 Volts
LOADPCT  :  42.0 Percent Load Capacity
BCHARGE  : 094.0 Percent
TIMELEFT :  20.1 Minutes
MBATTCHG : 5 Percent
MINTIMEL : 3 Minutes
MAXTIME  : 0 Seconds
SENSE    : High
LOTRANS  : 195.0 Volts
HITRANS  : 255.0 Volts
ALARMDEL : Always
BATTV    : 13.7 Volts
LASTXFER : Unacceptable line voltage changes
NUMXFERS : 2
XONBATT  : Sun Oct 21 11:09:34 India Standard Time 2007
TONBATT  : 0 seconds
CUMONBATT: 248 seconds
XOFFBATT : Sun Oct 21 11:09:48 India Standard Time 2007
SELFTEST : NO
STATFLAG : 0x07000008 Status Flag
SERIALNO : BB0426007951 
BATTDATE : 2004-06-22
NOMOUTV  : 2300
NOMINV   : 230
NOMBATTV :  12.0
FIRMWARE : 850.m3.I USB FW:m3
APCMODEL : Back-UPS ES 500
END APC  : Sun Oct 21 11:33:58 India Standard Time 2007


Given the fact that that the script will poll 57600 times, 16 Hours per day :
Is it less strenuous to use the DLL instead of AHK version of CmdRet ?
Is it less strenuous to the system to use CmdRet than outputting to a file and use FileReadLine ?
Is it less strenuous than CmdRet to the system if I output the file to a RAMDRIVE and use FileReadLine ?

Please advise.

Regards, :)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 21st, 2007, 7:08 pm 
Offline
User avatar

Joined: December 29th, 2004, 1:28 pm
Posts: 2541
Hi Skan,

Using the beta version of the DLL is probably a better idea until I put together an updated version of the AHK function. The latest patched version of the DLL has a few significant changes, but only for a couple functions ATM. Sorry, I've been a bit tied up lately but will see about updating CMDret soon... :)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 22nd, 2007, 8:27 am 
Online
User avatar

Joined: December 26th, 2005, 4:40 pm
Posts: 8775
corrupt wrote:
Using the beta version of the DLL is probably a better idea until I put together an updated version of the AHK function.


Thanks. :)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 31st, 2007, 3:59 pm 
Offline

Joined: August 20th, 2007, 6:57 pm
Posts: 185
*Bump

I'm trying to use this program to look for text inside of a telnet window so I can automate it basically I want to send keystrokes to it after the telnet script "NEWhoip" stops running. basically I WANT TO "RTFM" but cant find any instruction just prewritten code that I can't understand? Thank you in advance.
also is this the correct route or should I do more of an ORC


Report this post
Top
 Profile  
Reply with quote  
PostPosted: November 17th, 2007, 2:29 pm 
I'm having same problem as burtlo.

When I use CMDret_Stream with command line svf creating soft: cfv-1.18.1.exe.

when I use with winrar, all works perfectly, though with cfv - I get output only
when cfv is finished.

heres my code:
Code:
FileSelectFolder, destFolder
cfvCMD = C:\WINDOWS\cfv.bat -p "%destFolder%" -C -v

Gui, Add, Edit, x10 y10 r20 w280 vTestEdit, %Output%
Gui, Show, w300 h300 Center, Example

CMDret_Stream(cfvCMD,"optional",A_WorkingDir)
return

GuiClose:
ExitApp

CMDret_Output(CMDOut, CMDname="")
{
   global Output
   Output := Output "`n" CMDOut
   GuiControl,,TestEdit, %Output%
}

Or maybe any1 knows some other commandline sfv creating soft, which I could use instead of this one? I tried "Command Line SFV Checker" and bloody thing doesnt even work on my system for some reason (winXP).

Thanks in advance.


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 189 posts ]  Go to page Previous  1 ... 7, 8, 9, 10, 11, 12, 13  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: Google Feedfetcher, tic and 15 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group