Jump to content

HELP!


Recommended Posts

i am trying to make a database but so fare no suc6, i am stuck with adding information to the database

#include <GuiConstants.au3>

#include <GuiCombo.au3>

#NoTrayIcon

$database = FileRead("database.txt",100000)

$file = FileOpen("database.txt", 1)

Opt('MustDeclareVars',1)

Dim $Label,$Input,$Btn_Insert,$Combo,$Btn_Exit,$msg,$Status,$i_index, $read

GuiCreate("UP Database", 392, 254)

$Label = GuiCtrlCreateLabel("Enter String to Insert", 20, 20, 120, 20)

$Input = GuiCtrlCreateInput("", 160, 20, 180, 20)

$Btn_Insert = GuiCtrlCreateButton("Add String", 210, 50, 90, 30)

$Combo = GuiCtrlCreateCombo("", 70, 100, 270, 100,$CBS_SIMPLE)

GUICtrlSetData($Combo,$database)

$Btn_Exit = GuiCtrlCreateButton("Exit", 150, 200, 90, 30)

$Status = GUICtrlCreateLabel("",0,234,392,20,BitOR($SS_SUNKEN,$SS_CENTER))

GuiSetState()

While 1

$msg = GuiGetMsg()

Select

Case $msg = $GUI_EVENT_CLOSE Or $msg = $Btn_Exit

FileClose($file)

ExitLoop

Case $msg = $Btn_Insert

If(StringLen(GUICtrlRead($Input)) > 0) Then

$read = GUICtrlRead($Input)

FileWriteLine($file,"{BACKSPACE}"&"|"&$read)

$i_index =_GUICtrlComboInsertString($Combo,_GUICtrlComboGetCurSel($Combo),GUICtrlRead($Input))

GUICtrlSetData($Status,"Database Geupdate: " & $i_index)

EndIf

EndSelect

WEnd

Link to comment
Share on other sites

i am trying to make a database but so fare no suc6, i am stuck with adding information to the database

Hi there... and what is your problem in the database creation?

Can you be more specific?

Cheers

Old Scriptology

Visual Ping 1.8 - Mass Ping Program with export to txt delimited.

Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code.

Desktop 2 RGB - Pick a color in the desktop and get the RGB code.

ShootIT 1.0 - Screen Capture full and partial screen

[font="'Arial Black';"]Remember Remember The Fifth of November.[/font]

Link to comment
Share on other sites

if i insert a text it saves the text in the database.txt wrong and the next time you run the prog it reads the database wrong

Hi there,

How it should read then?

Give us an example please...

One thing that i saw was the backspace!

Be more specific please!

Best Regards.

Old Scriptology

Visual Ping 1.8 - Mass Ping Program with export to txt delimited.

Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code.

Desktop 2 RGB - Pick a color in the desktop and get the RGB code.

ShootIT 1.0 - Screen Capture full and partial screen

[font="'Arial Black';"]Remember Remember The Fifth of November.[/font]

Link to comment
Share on other sites

see Attachments, if you run the file you will see at the end of the list a wrong character i try to remove it with backspace in the source but that wont work

I runned the script and no weird char to mee!

Witch is the version of autoit that you are running?

Cheers!

Old Scriptology

Visual Ping 1.8 - Mass Ping Program with export to txt delimited.

Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code.

Desktop 2 RGB - Pick a color in the desktop and get the RGB code.

ShootIT 1.0 - Screen Capture full and partial screen

[font="'Arial Black';"]Remember Remember The Fifth of November.[/font]

Link to comment
Share on other sites

see image

I saw the image e no strange chars when i run in my pc...

Check your version of auto it.

Create a new database file

Check what kind of txt file are you saving the db (ANSI, unicode, UTF-8)

Cheers

Edited by november

Old Scriptology

Visual Ping 1.8 - Mass Ping Program with export to txt delimited.

Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code.

Desktop 2 RGB - Pick a color in the desktop and get the RGB code.

ShootIT 1.0 - Screen Capture full and partial screen

[font="'Arial Black';"]Remember Remember The Fifth of November.[/font]

Link to comment
Share on other sites

i tryed all formats but doesn't work

Hi again..

Im out of ideas!

Your code in my pc works like a charm...

Maybe is the codepage... i dont know... just a wild guess!

I really run out of ideas!

Sorry but i think i cant help you more :S

Cheers m8!

Old Scriptology

Visual Ping 1.8 - Mass Ping Program with export to txt delimited.

Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code.

Desktop 2 RGB - Pick a color in the desktop and get the RGB code.

ShootIT 1.0 - Screen Capture full and partial screen

[font="'Arial Black';"]Remember Remember The Fifth of November.[/font]

Link to comment
Share on other sites

thx for helping, mabay you can compile the source? and post it here

Sure no problem m8, here it goes

Cheers

Old Scriptology

Visual Ping 1.8 - Mass Ping Program with export to txt delimited.

Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code.

Desktop 2 RGB - Pick a color in the desktop and get the RGB code.

ShootIT 1.0 - Screen Capture full and partial screen

[font="'Arial Black';"]Remember Remember The Fifth of November.[/font]

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...