CLEO Help Done

CLEO related
Status
Not open for further replies.
Joined
Feb 18, 2005
Messages
2,963
Reaction score
267
Re: I want to know...

0B4A: samp 1@ = get_current_dialog_editbox_text
0B3C:  samp is_dialog_responded id 1@ button 2@ list_item 3@ input_text 4@

the either use,
0AD8: write_string_to_file $hFile from 0@v //IF and SET
0AF5: write_string "new string value" to_ini_file "cleo\config.ini" section "SectionName
 

Hidend

Expert
Joined
Mar 4, 2013
Messages
625
Reaction score
39
Re: I want to know...

Springfield you can do the whole script cause idk how to do that...

if something write in dialog, then send that text to a file
 

pepeelpubero

Well-known member
Joined
Jan 21, 2014
Messages
433
Reaction score
1
Re: I want to know...

Try with this, it should work.

Code:
{$CLEO .cs}

0000: NOP

:PEPE_255
wait 0
if
0B4C: samp is_dialog_active -1
else_jump @PEPE_255
0AC8: 1@ = allocate_memory_size 260 
0B4A: samp 1@ = get_current_dialog_editbox_text
0AF5: write_string 1@ to_ini_file "cleo\text.ini" section "dialog" key "text"
goto @PEPE_255
 

Hidend

Expert
Joined
Mar 4, 2013
Messages
625
Reaction score
39
Re: I want to know...

pepeelpubero link said:
Try with this, it should work.

Code:
{$CLEO .cs}

0000: NOP

:PEPE_255
wait 0
if
0B4C: samp is_dialog_active -1
else_jump @PEPE_255
0AC8: 1@ = allocate_memory_size 260 
0B4A: samp 1@ = get_current_dialog_editbox_text
0AF5: write_string 1@ to_ini_file "cleo\text.ini" section "dialog" key "text"
goto @PEPE_255
that shit don't work for me.

And i want to save in a .ini all things i want, or at least 10, i don't want if i write something, and i return to write, 1st thing got removed
 

pepeelpubero

Well-known member
Joined
Jan 21, 2014
Messages
433
Reaction score
1
Re: I want to know...

Maybe changing 2@ with something that generates a number between 1 and 10, it will be possible.

Code:
{$CLEO .cs}

0000: NOP

:PEPE_255
wait 0
/* ONLY FOR DIALOG_STYLE_INPUT:
0B4D: samp 1@ = get_current_dialog_type
if
1@ == 1 // DIALOG INPUT
*/
if
0B4C: samp is_dialog_active -1
else_jump @PEPE_255
2@ = 1
0AD3: 28@v = format "%d" 2@
0B4A: samp 1@v = get_current_dialog_editbox_text              
0AF5: write_string 1@v to_ini_file "cleo\text.ini" section 28@v key "text"
goto @PEPE_255
 
Joined
Feb 18, 2005
Messages
2,963
Reaction score
267
Re: I want to know...

Code:
{$CLEO}
0000:
repeat
wait 0
until 0AFA:
0A9A: 31@ = openfile "CLEO\text.txt" mode "at+"
0AC8: 1@ = 260

while true
wait 0
if 0B4C:  samp is_dialog_active -1
then 
    0B4A: samp 1@ = get_current_dialog_editbox_text
    0C17: 2@ = strlen 1@
    if 2@ >= 1
    then 0AD8: write_string_to_file 31@ from 1@ 
    end
end
end
 

Hidend

Expert
Joined
Mar 4, 2013
Messages
625
Reaction score
39
Re: I want to know...

Evangelical link said:
dont know what ?
1. Create dialog with style DIALOG_STYLE_INPUT
2. Create it with OK button
3. When you have the text inside the dialog, and press enter or OK button send to a txt/ini file

Tried with a lot of methods, none work...
 

Opcode.eXe

Expert
Joined
Feb 18, 2013
Messages
1,486
Reaction score
227
Location
( ͡° ͜ʖ ͡°)
Re: I want to know...

Create a dialog with:

0B80: 0@ = create_dialog "{EECC00}Dialog title:DD"
0B86: dialog 0@ set_visible    FALSE
0B9F: dialog  0@  enable_caption  TRUE
0BA1: dialog  0@  set_minimized  FALSE
0B84: dialog  0@  set_pos_XY 0 0 size 200 350
0B93: dialog  0@  set_background_color 0xC8000000
0B83: dialog  0@  add_checkbox id 1 text  "YU GAY?" pos_XY 160 0 size 20 20
0B88: dialog 0@ add_editbox id 2 text "type text here" pos_XY 0 50 size 200 20
0B82: dialog 0@ add_button id 3 text "CLOSE" pos_XY 0 60 200 12

use dialog opcodes
 

Hidend

Expert
Joined
Mar 4, 2013
Messages
625
Reaction score
39
Re: I want to know...

Opcode.eXe link said:
Create a dialog with:

0B80: 0@ = create_dialog "{EECC00}Dialog title:DD"
0B86: dialog 0@ set_visible    FALSE
0B9F: dialog  0@  enable_caption  TRUE
0BA1: dialog  0@  set_minimized  FALSE
0B84: dialog  0@  set_pos_XY 0 0 size 200 350
0B93: dialog  0@  set_background_color 0xC8000000
0B83: dialog  0@  add_checkbox id 1 text  "YU GAY?" pos_XY 160 0 size 20 20
0B88: dialog 0@ add_editbox id 2 text "type text here" pos_XY 0 50 size 200 20
0B82: dialog 0@ add_button id 3 text "CLOSE" pos_XY 0 60 200 12

use dialog opcodes
and when i create the dialog, how can i do this?

Hidend link said:
3. When you put text inside the dialog, and press enter or OK button, send what i put in the dialog to a txt/ini file
 

Hidend

Expert
Joined
Mar 4, 2013
Messages
625
Reaction score
39
Re: I want to know...

Still need this, tried a lot of times and nothing...

I need the whole script with a key to open a dialog, the dialog type "DIALOG_STYLE_INPUT", two buttons, 1 OK and other CLOSE, if you press OK, the text you put in dialog, will save in .txt or in a .ini
 

Hidend

Expert
Joined
Mar 4, 2013
Messages
625
Reaction score
39
Re: I want to know...

[member=111]springfield[/member] [member=6677]TH3RM4L[/member] [member=60]Opcode.eXe[/member]  halp plz

i tried this, i don't know where is the error

{$VERSION 3.1.0000}
{$CLEO .cs}

0000:

:DIALOG
repeat
wait 0
until 0AFA:
0A9A: 31@ = openfile "CLEO\text.txt" mode "at+"
wait 0 ms
if
0AB0: 49 // activation key
jf @DIALOG
0B3B: samp show_dialog id 2 caption "DIALOG" text "Ammo" button_1 "Ok" button_2 "" style 1
0AC8: 3@ = allocate_memory_size 128
jump @Ammo

:Ammo
wait 0 ms
if
0B3C: samp dialog_respond 0@ button 1@ list_item 2@ input_text 3@
jf @Repeat
if
0@ == 2
jf @Repeat
if
1@ == 1
jf @END
0AD8: write_string_to_file 31@ from 3@
0AC9: free_allocated_memory 3@
jump @DIALOG

:END
if
1@ == 2
jf @Repeat
jump @DIALOG

:Repeat
jump @Ammo

i edited from springfield script, the dialog works, but all i put in the dialog don't get save to text.txt

i tried to remove

0AD8: write_string_to_file 31@ from 3@
to
0B4A: samp 21@ = get_current_dialog_editbox_text

and the same, don't save all i put in the dialog, i don't understand, a simple shit being soooooooooooo hard

PD: if i remove text.txt file, if i put something in dialog, cleo it re-create, but is empty, without the text i put inside the dialog...

PD2: If i put something in dialog, that dialog don't open again, and i want to open all time i press "1", and save all time the info i put when i write inside dialog
 

Hidend

Expert
Joined
Mar 4, 2013
Messages
625
Reaction score
39
Re: I want to know...

Maybe someone can help?

[member=26707]HenryTeylor[/member] I saw you making some things with dialogs, maybe you know :(
 

Hidend

Expert
Joined
Mar 4, 2013
Messages
625
Reaction score
39
Re: I want to know...

HenryTeylor link said:
What should the script?
I think is simple for people know this...

I only need to create a dialog of type DIALOG_STYLE_INPUT
Then all things i write in dialog, will go to a .ini or .txt file
 
Status
Not open for further replies.
Top