This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#26 2012-03-11 11:06:13

dmlathouse
Scratcher
Registered: 2012-02-27
Posts: 2

Re: CMD Tricks?

well i do ruby programming language, that is a cmd script

when gf clicked
repeat until <(timer) > [10]>
  go to [mouse-pointer v]
end
think [Scripts in your posts!] for (3) secs

Offline

 

#27 2012-03-11 12:58:31

nickbrickmaster
Scratcher
Registered: 2010-02-02
Posts: 500+

Re: CMD Tricks?

dmlathouse wrote:

well i do ruby programming language, that is a cmd script

when gf clicked
repeat until <(timer) > [10]>
  go to [mouse-pointer v]
end
think [Scripts in your posts!] for (3) secs

It's not really, it just uses CMD as I/O. Plus, Please don't randomly put blocks in your posts.


Ask me what I'm doing, wait an hour than roll a die, if it's 4-6, I'm playing Skyrim, if it's 1, I'm eating, if it's 2-3 I'm programming.
Steam: nickbrickmaster | RotMG: PwnThemAll | Minecraft: nickbrickmaster | League Of Legends: BaneOfTitans

Offline

 

#28 2012-03-15 17:21:41

DigiTechs
Scratcher
Registered: 2011-04-30
Posts: 500+

Re: CMD Tricks?

Try this  tongue 
PING localhost

(it PINGs your computer, thats what localhost means)
Also, try this (you have to be running from where cmd is, System32):
shutdown.exe

This does exactly as the exe is named  tongue


I'm back.
Maybe.

Offline

 

#29 2012-03-15 17:22:58

CheeseMunchy
Scratcher
Registered: 2008-10-13
Posts: 1000+

Re: CMD Tricks?

I know you can write your own commands.


6418,

Offline

 

#30 2012-03-15 17:52:26

DigiTechs
Scratcher
Registered: 2011-04-30
Posts: 500+

Re: CMD Tricks?

also, Try this; (I found it recently)
help

Brings up ALL of the commands in CMD


I'm back.
Maybe.

Offline

 

#31 2012-03-15 17:56:00

DigiTechs
Scratcher
Registered: 2011-04-30
Posts: 500+

Re: CMD Tricks?

TASKLIST       Displays all currently running tasks including services.
TASKKILL       Kill or stop a running process or application.

Copied directly from CMD  tongue
EDIT: Makes a "CMDtaskmanager"

Last edited by DigiTechs (2012-03-24 07:29:20)


I'm back.
Maybe.

Offline

 

#32 2012-03-26 13:44:56

DigiTechs
Scratcher
Registered: 2011-04-30
Posts: 500+

Re: CMD Tricks?

Hmmm.. I'm trying to make a BATCH version of a game I know very well.. and I don't know how to use IF statements in CMD...


I'm back.
Maybe.

Offline

 

#33 2012-03-26 14:15:42

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: CMD Tricks?

DigiTechs wrote:

Hmmm.. I'm trying to make a BATCH version of a game I know very well.. and I don't know how to use IF statements in CMD...

IF statements in Batch are either followed by a single action or have to be coupled with a GOTO statement (that points to a label).

So something like this should work:
SET test=5
IF %test%==5 GOTO hello
GOTO goodbye

:hello
echo Hey!

:goodbye
echo Bye!

________
EDIT
************

If you really want to be professional, you can use this working example:

Code:

@echo off
SET /P test=Input a number from 1 to 5: 
IF %test%=="hi" GOTO hello
echo Bye
goto end
:hello
echo Hey
:end
pause

Last edited by LS97 (2012-03-26 14:25:57)

Offline

 

#34 2012-03-27 06:07:34

DigiTechs
Scratcher
Registered: 2011-04-30
Posts: 500+

Re: CMD Tricks?

LS97 wrote:

DigiTechs wrote:

Hmmm.. I'm trying to make a BATCH version of a game I know very well.. and I don't know how to use IF statements in CMD...

IF statements in Batch are either followed by a single action or have to be coupled with a GOTO statement (that points to a label).

So something like this should work:
SET test=5
IF %test%==5 GOTO hello
GOTO goodbye

:hello
echo Hey!

:goodbye
echo Bye!

________
EDIT
************

If you really want to be professional, you can use this working example:

Code:

@echo off
SET /P test=Input a number from 1 to 5: 
IF %test%=="hi" GOTO hello
echo Bye
goto end
:hello
echo Hey
:end
pause

Thanks!


I'm back.
Maybe.

Offline

 

#35 2012-03-27 06:19:33

nathanprocks
Scratcher
Registered: 2011-04-14
Posts: 1000+

Re: CMD Tricks?

DigiTechs wrote:

Try this  tongue 
PING localhost

(it PINGs your computer, thats what localhost means)
Also, try this (you have to be running from where cmd is, System32):
shutdown.exe

This does exactly as the exe is named  tongue

You can also use that command on a network too.  tongue
Also, you can make a short-cut in someone else's "startup" folder, which is on their start menu and type this for the location

Code:

shutdown.exe -l -t 0

When the person tries to login, it will run the short-cut, which logs them off.  tongue


http://carrot.cassiedragonandfriends.org/Scratch_Signature/randomsig.php
http://trinary.site40.net/images/scratchrank.php?username=nathanprocks&amp;display=small

Offline

 

#36 2012-03-27 06:20:59

nathanprocks
Scratcher
Registered: 2011-04-14
Posts: 1000+

Re: CMD Tricks?

DigiTechs wrote:

also, Try this; (I found it recently)
help

Brings up ALL of the commands in CMD

Also, if you type "help <command>" it shows help for that command. Another way is "<command> /?"


http://carrot.cassiedragonandfriends.org/Scratch_Signature/randomsig.php
http://trinary.site40.net/images/scratchrank.php?username=nathanprocks&amp;display=small

Offline

 

#37 2012-03-27 06:24:33

nathanprocks
Scratcher
Registered: 2011-04-14
Posts: 1000+

Re: CMD Tricks?

I would make a number guessing game in batch but I am not using Windows at the moment.


http://carrot.cassiedragonandfriends.org/Scratch_Signature/randomsig.php
http://trinary.site40.net/images/scratchrank.php?username=nathanprocks&amp;display=small

Offline

 

Board footer