Computer Science Canada


Author:  BryX [ Mon Sep 29, 2003 4:37 pm ]
Post subject:  system

is there any way to have a combination of both string and variables in the system command? cause when i try it i can't get it to work with either + or commas, is there any other operators that would work?


system ("blablaba" variable "blabalbla", a")
system ("blabalba"+variable+"blablabla",a)
system ("blablabla", variable,"blablabla",a)

ps. ne reason why sigs don't work on this forum?

Author:  rizzix [ Mon Sep 29, 2003 5:23 pm ]
Post subject: 

jeez man why do you guys even think a comma is used to mix variables and strings.

use the + operator. Which stands for concatenation. so use + only.

Author:  BryX [ Mon Sep 29, 2003 5:26 pm ]
Post subject: 

cuase our teacher told us to use it when using put statement so i just assumed to use it everywhere else Embarassed

Author:  rizzix [ Mon Sep 29, 2003 5:28 pm ]
Post subject: 

yea it is a turing language syntax problem. turing is not a perfect language.

the comma in turing is used only for system functions and it stands for seperating arguments (thus not necessarly strings).

don't use it anywhere except for system functions

Author:  BryX [ Mon Sep 29, 2003 6:55 pm ]
Post subject: 

The command doesn't work properly now, ne idea why?


var localip:string:=Net.LocalAddress
var scrname,sendtxt,ip, command1:string
var sent,error,w1,w2:int
var FontID:int := Font.New ("Arial:30:italic")
var FontID1:int :=Font.New ("Arial:75:italic")
w1:= Window.Open ("title: Bryan's Chat Program, graphics: max,max, position: 0,0")
put "Please Enter a screen name..."
    get scrname
        put "Enter a message to send.."
        get sendtxt
        put"enter an ip"
        get ip
        command1:="net send "+ip+" "+sendtxt+localip
        put command1 delay (3000)
        system (command1, sent)
        error := Error.Last
        if error =0 then cls
        elsif error not=0 then w2:= Window.Open ("title: Clssroom Map, graphics: 240,120, position: 120,500")put Error.Last
        end if
    end loop

Author:  Blade [ Mon Sep 29, 2003 9:54 pm ]
Post subject: 

well i tried it but i dont have messenger running on any of my computers because of the stupid popups that dumb people send over the internet, however i didnt get any errors or anything

and as for the sig you need an http:// in there

Author:  rizzix [ Tue Sep 30, 2003 9:06 am ]
Post subject: 


jeez.... infact never use a comman. Hate the comma else it will bring you bad luck.

Author:  octopi [ Tue Sep 30, 2003 11:55 am ]
Post subject: 

Need a space between sendtxt and localip?

Author:  rizzix [ Tue Sep 30, 2003 12:04 pm ]
Post subject: 

no eh.. no way. as i said it's the comma.

system (command1, sent)

should be changed to this:
system (command1 + sent)

Author:  BryX [ Tue Sep 30, 2003 3:41 pm ]
Post subject: 

no man i need the comma works fine with it,and actually i tried the program at school and it worked fine jus couldn't test it properly over a network at home cause i only have one comp

Author:  rizzix [ Tue Sep 30, 2003 3:51 pm ]
Post subject: 

oh. then whats wrong?

Author:  BryX [ Tue Sep 30, 2003 3:53 pm ]
Post subject: 

thats what i emant, nothing is wrong, i just tried to get it to message myself at home and i didn't work so i assumed it didn't work but when i tried it at school i moded the code a bit to create messages on random computers throughout the school lol Laughing

Author:  14fenix [ Tue Sep 30, 2003 7:46 pm ]
Post subject: 

Heheh, so that was you... I didn't get one but a lot of kids were being pissed off lol.

Author:  thoughtful [ Sat Oct 11, 2003 11:42 pm ]
Post subject: 

Hey thats a pretty neat program. Put the command in a loop and you got ur self a floder...hehe gonna flood my school computers

Author:  Tony [ Sun Oct 12, 2003 4:00 pm ]
Post subject: 

heh, last year me and my friend wrote couple of those flooder programs in VB and we sending those messages in packs of 10,000 Laughing

Funny thing was - cmd was disabled, but it still worked though VB.