hey
i want this
when i click a button
this must happen
a DlG(dialog) pop up with a edit box in it you put a site(string) in it and it gets saved in string.
almost the same as readln in scar
Hermpie
@boreas: already thanks
hey
i want this
when i click a button
this must happen
a DlG(dialog) pop up with a edit box in it you put a site(string) in it and it gets saved in string.
almost the same as readln in scar
Hermpie
@boreas: already thanks
~Hermen



What's the difference from ReadLn?
let me say, it's the same as readln but then in delphi, and i don't like it that you always look for this little bug typed text ... i know my english sucks and everyone makes mistakes but i just get pissed of that kinds of things...
~Hermen
I guess you could make another form, that you load and popup( Form2.Show; ) when you call the function. The form should contain one edit box. After the Button is closed, close the form and free it again.
The best way to contact me is by email, which you can find on my website: http://wizzup.org
I also get email notifications of private messages, though.
Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
Documentation | Source | Simba Bug Tracker on Github and Villavu )
My (Blog | Website)
thanks! dan told me the same yet to bad they don't got a dialog for it but thanks wizzup?
~Hermen
Well, if TForm1 is your 'first' form, this could be a usefull procedure.
SCAR Code:procedure TForm1.AddForm(Sender: TObject);
begin
Form1.Show; // To replace the ShowModal. (You can't have two ShowModals at the same time...
Application.CreateForm(TForm2, Form2);
Form2.ShowModal;
end;
And perhaps in your Form2 code:
SCAR Code:procedure TForm2.FreeIt(Sender: TObject; var Action: TCloseAction);
begin
//Freeing stuff here.
end;
And your Form2.InitForm should just contain the creation of the edit box with a button.
The best way to contact me is by email, which you can find on my website: http://wizzup.org
I also get email notifications of private messages, though.
Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
Documentation | Source | Simba Bug Tracker on Github and Villavu )
My (Blog | Website)
i need to use this when i want to let show this dialog?
~Hermen
Example: InPutQuery('Find Window', 'Enter the exact name of the window:', str)Code:function InputQuery(const ACaption, APrompt: string; var Value: string): Boolean; function InputQuery(const ACaption, APrompt: WideString; var Value: WideString): Boolean; overload; function InputQuery(const ACaption, APrompt: WideString; var Value: string): Boolean; overload; function InputQuery(const ACaption, APrompt: WideString; var Value: Double, Min: Double = Low(Integer); Max: Double = High(Integer); Decimals: Integer = 1): Boolean; overload; function InputQuery(const ACaption, APrompt: WideString; var Value: Integer, Min: Integer = Low(Integer); Max: Integer = High(Integer); Increment: Integer = 1): Boolean; overload;
Administrator's Warning:
can you give an example?
~Hermen
SCAR Code:const
a = 'website';
b = 'what is the name of the website';
var
c: string;
procedure ask;
begin
InputQuery(a, b, c);
edit.text := c
end;
EDIT: yep that example works
SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
Programming Projects: NotePad | Tetris | Chess
i yet made a cool form for it...
can some1 tell me why i can't see the 'childs on form2'
SCAR Code:Form2.Show;
Link1.Caption:=(GetBetween(Site,'.','.'));
got that in it
the form compiles i can see form2 but not the childs
ps. can some1 fix this
for scar, so you can fill in somthing like infight; or bankscreen; (in HUntil)SCAR Code:Function HWait (MaxTime:Integer; HUntil:Boolean): Boolean;
Var
Time : Integer;
Begin
MarkTime(Time);
Repeat
Wait(100 + Random(50));
Until HUntil or (TimeFromMark(Time) > MaxTime);
End;
~Hermen



Something like that?SCAR Code:program New;
function Bool: Boolean;
begin
Result:= Random(100) = 0;
end;
procedure HWait(MaxTime: Integer; HUntil: Function: Boolean);
var
T: Integer;
begin
T:= GetSystemTime;
while not HUntil() and not(GetSystemTime - T > MaxTime) do
wait(50);
end;
begin
HWait(5000, @Bool);
end.
Wrong thread and WTF?(not blaming you)
no thats not what i mean check other thread
~Hermen
There are currently 1 users browsing this thread. (0 members and 1 guests)