| View previous topic :: View next topic |
| Author |
Message |
DevilGilad Grandmaster Cheater
Reputation: 0
Joined: 10 May 2007 Posts: 624 Location: Delete C:\WINDOWS folder and you'll be able to see me.
|
Posted: Sat Aug 04, 2007 9:54 am Post subject: [Problem] Delphi |
|
|
Here's my problem:
I wish you'll answer me as fast as you can :'{ _________________
|
|
| Back to top |
|
 |
Kevin Grandmaster Cheater Supreme
Reputation: 0
Joined: 07 Mar 2007 Posts: 1139 Location: Spiderman-World
|
Posted: Sat Aug 04, 2007 9:56 am Post subject: |
|
|
I think you need to use PAnsiChar
google it. |
|
| Back to top |
|
 |
Symbol I'm a spammer
Reputation: 0
Joined: 18 Apr 2007 Posts: 5094 Location: Israel.
|
Posted: Sat Aug 04, 2007 10:01 am Post subject: |
|
|
| what is net send * exacly? O_o |
|
| Back to top |
|
 |
Nigtronix Cheater
Reputation: 0
Joined: 18 May 2007 Posts: 45
|
Posted: Sat Aug 04, 2007 10:06 am Post subject: |
|
|
net send * will basically send everyone in your Windows workgroup (DOMAIN) a message through the messenger service. The message will be received as a pop-up box on their computer. I use to have a lot of fun with this about 4 years ago in school . There are ways to spoof sender so you won't get caught, or delay the process of getting caught. |
|
| Back to top |
|
 |
Symbol I'm a spammer
Reputation: 0
Joined: 18 Apr 2007 Posts: 5094 Location: Israel.
|
Posted: Sat Aug 04, 2007 10:41 am Post subject: |
|
|
ok... dont think i understanded O_o
try:
| Code: | | ShellExecute(Handle, 'open', PAnsiChar('net send *'+Edit1.Text), nil, nil, SW_SHOWNORMAL); |
for the Timer try:
| Code: | | Timer1.Interval:=IntervalBox.Text | i dont get why the +000 is for...
edit: how could i be so stupid O_o
Interval cant be asdf miliseconds O_o must be integer...
try:
| Code: | | Timer1.Interval:=StrToInt(IntervalBox.Text)+000 |
dont get why the +000 is for but this should work
edit2:
what does it do..? it doesnt do anything for me i dont get any pop-up or w/e... |
|
| Back to top |
|
 |
smartz993 I post too much
Reputation: 2
Joined: 20 Jun 2006 Posts: 2013 Location: USA
|
Posted: Sat Aug 04, 2007 12:20 pm Post subject: |
|
|
I'll give you some code that won't give you errors!
First Problem:
ShellExecute uses a PChar for "what to execute" parameter.
So to fix this..just do this:
| Code: | | ShellExecute(Handle, 'open', PChar('net send *'+MessageBox.Text), nil, nil, SW_SHOWNORMAL); |
The second problem is that you are trying to use a string, which is like a word in english, as a number.
To fix this....use the StrToInt command, which converts a string to an integer. It would look like this:
| Code: | | Timer1.Interval:=StrToInt(IntervalBox.Text)*1000 |
I changed the +000 to *1000...the reasoning behind this is that +000 adds that number to whatever the number is. It's really adding 0...I multiply by 1000, which adds three 0s to the end of the number.
I hope you understand the explanations. If you have any more questions just ask.  |
|
| Back to top |
|
 |
Symbol I'm a spammer
Reputation: 0
Joined: 18 Apr 2007 Posts: 5094 Location: Israel.
|
Posted: Sat Aug 04, 2007 3:01 pm Post subject: |
|
|
oh i get it... i didnt understand why he added 0 but he wanted to make it seconds...
and i already answerd him for the first
i didnt knew how to make it seconds now i know =) |
|
| Back to top |
|
 |
samuri25404 Grandmaster Cheater
Reputation: 7
Joined: 04 May 2007 Posts: 955 Location: Why do you care?
|
Posted: Sat Aug 04, 2007 3:26 pm Post subject: |
|
|
Make a PString, then turn it into an array of characters, and pass it in. In C#, you could do something like:
| Code: |
PString asdf = "Command"; //Not sure if PString is actually a type in C#
PAnsiChar[] qwer = asdf.ToCharArray(); //I know for a fact that doesn't
//exist in C#
|
I suppose in Delphi, you could do something like:
| Code: |
procedure whatever
var
asdf : PString;
qwer : PAnsiChar[];
length,i : integer;
begin
asdf := "Command";
length := asdf.Length;
for (i := 0, i <= length, i = i+1)
begin
setlength(qwer,qwer.Length+1);
qwer.Add(asdf[i]); //Though you can't do that because asdf isn't
//an array, and I'm not sure that's even the right command
end
end
|
|
|
| Back to top |
|
 |
Symbol I'm a spammer
Reputation: 0
Joined: 18 Apr 2007 Posts: 5094 Location: Israel.
|
Posted: Sat Aug 04, 2007 3:31 pm Post subject: |
|
|
we answerd him... twice... and shorter ways...
why does everybody assign "i" as a variable? O_o
cuz integer? |
|
| Back to top |
|
 |
magicalimp Expert Cheater
Reputation: 0
Joined: 03 Dec 2006 Posts: 105
|
Posted: Sat Aug 04, 2007 5:24 pm Post subject: |
|
|
| Why not use WinExec instead of ShellExecute? |
|
| Back to top |
|
 |
appalsap Moderator
Reputation: 0
Joined: 27 Apr 2006 Posts: 6753 Location: Pakistan
|
Posted: Sat Aug 04, 2007 5:27 pm Post subject: |
|
|
| magicalimp wrote: | | Why not use WinExec instead of ShellExecute? |
because WinExec is a deprecated function only provided for compatibility with 16-bit Windows. |
|
| Back to top |
|
 |
Kevin Grandmaster Cheater Supreme
Reputation: 0
Joined: 07 Mar 2007 Posts: 1139 Location: Spiderman-World
|
Posted: Sun Aug 05, 2007 1:21 am Post subject: |
|
|
| Symbol wrote: | we answerd him... twice... and shorter ways...
why does everybody assign "i" as a variable? O_o
cuz integer? |
I = Integer
S = String
lol so simple  |
|
| Back to top |
|
 |
Spy2805 Newbie cheater
Reputation: 0
Joined: 14 Dec 2007 Posts: 19 Location: In the void
|
Posted: Fri Dec 14, 2007 11:01 am Post subject: |
|
|
heres a problem it wont let me see the picture!!!!! _________________
Trololol  |
|
| Back to top |
|
 |
|