Sign in to follow this  
Followers 0
billthecreator

Command Prompt

22 posts in this topic

#1 ·  Posted (edited)

Prommand Compt

Leave some comments, I'd like to hear of what you think, and if there is anything i can add. Thank you.

Script:

commandprompt.au3

Edited by billthecreator

[font=Microsoft Sans Serif]My Scripts: From Most recent to least.[/font]Countdown GUI | QLOCK TWO | FlipClock | Slot Machine My UDF:_GenerateRandomNoRepeat | _GuiSnap

Share this post


Link to post
Share on other sites



very cool muttley nice job bill

i really needed a console udf some time ago but i was to lazy to make it my self :)


Only two things are infinite, the universe and human stupidity, and i'm not sure about the former -Alber EinsteinPractice makes perfect! but nobody's perfect so why practice at all?http://forum.ambrozie.ro

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

It'd be nicer if the writer was a little bigger, and able to use the command

'cd' in the actual CMD. As in, Change Directory, to change to that directory, and if it's windows, change to windows directory, etc! Thanks mucho!

It'd be cool to make a compiled version. So you don't have to download the extras muttley

Edit: Nevermind, CTRL + + increases size :)

Edited by Alienware

Share this post


Link to post
Share on other sites

This is crazy muttley Really good job :) I love it !


code

Share this post


Link to post
Share on other sites

I like it, but could you add the ability to run programs in directories specified in the PATH? The way it is right now, it must be in the current directory.

Share this post


Link to post
Share on other sites

Some good features but also a lot of problems.

I had to comment out these lines to stop errors

;$aOSInfo[$i][12] = $objItem.DataExecutionPrevention_32BitApplications
;$aOSInfo[$i][13] = $objItem.DataExecutionPrevention_Available
;$aOSInfo[$i][14] = $objItem.DataExecutionPrevention_Drivers
;$aOSInfo[$i][15] = $objItem.DataExecutionPrevention_SupportPolicy

The drive is assumed to be C: even though it imight not be and it would be easy to find the current drive.

The line

$hC = FileGetTime("C:")

does not return an array so the next line fails, (and so DIR doesn't work).

No command I typed would run any programs even though they were in the folder given by the prompt.

CD\ doesn't work for me.

Typing C: doesn't work, but typing cd.. untill you get to the route folder suddenly switches to C: even though before that it was D:\somefolder, and then I can't get back to D:

If I used run to get the run prompt I couldn't see how to get back to the initial command prompt.

Not an "enhanced user experience" I'm afraid. muttley


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

$size is on line 49, for all those people with resolutions above 1024x768 muttley

Otherwise a great mirror of cmd.

I can't figure out "cd"... I tried:

C:\
C:
C:\Windows
Windows
C:\Windows\
Windows\

Can I only pick a directory within the current directory?

Lastly, it'd be nice if pressing UP brought up the previous entry.

Share this post


Link to post
Share on other sites

$size is on line 49, for all those people with resolutions above 1024x768 muttley

Otherwise a great mirror of cmd.

I can't figure out "cd"... I tried:

C:\
C:
C:\Windows
Windows
C:\Windows\
Windows\

Can I only pick a directory within the current directory?

Lastly, it'd be nice if pressing UP brought up the previous entry.

I cannot get the cd to work either! :)

Share this post


Link to post
Share on other sites

yes, so far its a directory within the directory. and ive tried to do the up down thing. but ill work on them. this isnt an easy script... maybe you can help me help you, you know?


[font=Microsoft Sans Serif]My Scripts: From Most recent to least.[/font]Countdown GUI | QLOCK TWO | FlipClock | Slot Machine My UDF:_GenerateRandomNoRepeat | _GuiSnap

Share this post


Link to post
Share on other sites

When I type "dir" I get error: Subscript used with non-Array variable

Share this post


Link to post
Share on other sites

its there. its CLEAR

Why not cls? It's cls not clear... in ms-dos anyway.

Share this post


Link to post
Share on other sites

Well congrats.

This is awesome, I hope you don't limit this to command prompt functions, this has a whole world of new features.


Don't bother, It's inside your monitor!------GUISetOnEvent should behave more like HotKeySet()

Share this post


Link to post
Share on other sites

#20 ·  Posted (edited)

Here's something from an older program of mine i used it to calculate paths :( like

c:\windows\..\Documents and Settings\..\Program Files\

or if the path is relative .... cd ..\whateva\whateva2

If _isfolder($string[2]) Or _isfolder($udir[$z]&"\"&$string[2]) Then 
                                            If StringRegExp($string[2],"(?i)[a-z]:") Then;if path is absolute
                                                Local $fp = FileGetLongName($string[2],1)
                                            Else;path is relative
                                                Local $fp = FileGetLongName($udir[$z]&"\"&$string[2])
                                            EndIf
                                            $fp=StringRegExpReplace($fp,'(?i)\\([^\\])+\\\.\.',"");replace \..\
                                            _rdWrite($rd,"changed dir to: "&$fp,1)
                                            $udir[$z]=FileGetLongName($fp)
                                        Else
                                            _rdWrite($rd,"Folder does not exist or it's not a folder!",1)
                                        EndIf

Func _isfolder($file)
    $attrib=FileGetAttrib($file)
    If StringInStr($attrib,"D") Then Return 1
    Return 0
EndFunc

some explanations ... $udir[$z] was the active directory of the current user cause the app is multi user and $string[2] was the path to cd to ([0]=2,[1]=cd,[2]=path :))

here's the full script if you want to have a better look through it muttley oh and btw i wanted to do that history thing too but i wanted to make it serversite :P and i was to lazy to finish it :dance:

#513504

my approach for the command history was .. write commands to a file and remember the line of the file u are at ... when u push uparrow or downarrow serve the line of the file that is -1 or +1 row in the file :cheer:

Edited by TheMadman

Only two things are infinite, the universe and human stupidity, and i'm not sure about the former -Alber EinsteinPractice makes perfect! but nobody's perfect so why practice at all?http://forum.ambrozie.ro

Share this post


Link to post
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
Sign in to follow this  
Followers 0