Sign in to follow this  
Followers 0
realkiller

help:)

3 posts in this topic

i made this database so far so good, the only problem i fase now is: if i click on add it must add the text into acces (i inserted the acces file)

;==>Login 
$password = "@circumflex1487"
Do
    Sleep(100)
Until Login()

Func Login()
    $login_Password_I = InputBox("Login", "Password please: ", "", "*")
    If $login_Password_I == $password Then Return 1
    Return 0
EndFunc   
;==>Login 

#include <GuiConstants.au3>
#include <GuiCombo.au3>
#include <File.au3>
#NoTrayIcon

$database = FileRead("pc.txt",20000)
$database1 = FileRead("firmanaam.txt",20000)
$database2 = FileRead("user.txt",20000)
$database3 = FileRead("sn.txt",20000)
Opt('MustDeclareVars',1)

Dim $Input,$Input1,$Input2,$Input3,$Btn_Insert,$Combo,$Combo1,$Combo2,$Combo3,$Btn_Exit,$msg,$Status,$i_index,$read,$read1,$read2,$read3,$read4,$read5

GuiCreate("Aufgaben Database, "&@UserName, 650, 300)
$Input = GuiCtrlCreateCombo("", 10, 20, 60, 21);priority
GUICtrlSetData(-1,"Low|Normal|Urgent|")
$Input1 = GuiCtrlCreateCombo("", 71, 20, 110, 21);firma
GUICtrlSetData(-1,"Alexander Krings|Volker Hertzer|Willi Philipps|Robert Hertzer|Norman Moonen|Christoph Willms|Kloke Thomas|Azubis|Leiters")
$Input2 = GuiCtrlCreateInput("", 182, 20, 320, 21);task
$Input3 = GuiCtrlCreateInput(@MDAY&"-"&@MON&"-"&@YEAR&"   "&@HOUR&":"&@MIN, 503, 20, 97, 21);date

$Btn_Insert = GuiCtrlCreateButton("Add", 600, 20, 50, 20)
GuiCtrlCreateLabel("Priority", 20, 5, 100, 11)
GuiCtrlCreateLabel("User", 105, 5, 100, 11)
GuiCtrlCreateLabel("Task", 330, 5, 100, 11)
GuiCtrlCreateLabel("Date", 516, 5, 100, 11)


GuiCtrlCreateLabel("Priority", 20, 85, 100, 11)
GuiCtrlCreateLabel("User", 105, 85, 100, 11)
GuiCtrlCreateLabel("Task", 330, 85, 100, 11)
GuiCtrlCreateLabel("Date", 516, 85, 100, 11)

$Combo = GuiCtrlCreateCombo("", 10, 100, 60, 209,$CBS_SIMPLE);pc naam
$Combo1 = GuiCtrlCreateCombo("", 71, 100, 110, 209,$CBS_SIMPLE);firma
$Combo2 = GuiCtrlCreateCombo("", 182, 100, 320, 209,$CBS_SIMPLE);locatie/gebruiker
$Combo3 = GuiCtrlCreateCombo("", 503, 100, 97, 209,$CBS_SIMPLE);serienr


GUICtrlSetData($Combo,$database)
GUICtrlSetData($Combo1,$database1)
GUICtrlSetData($Combo2,$database2)
GUICtrlSetData($Combo3,$database3)
$Status = GUICtrlCreateLabel("",0,747,1024,19,BitOR($SS_SUNKEN,$SS_CENTER))

GuiSetState()
While 1
$msg = GuiGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE 
ExitLoop
Case $msg = $Btn_Insert
;controlle 


while 1

If(StringLen(GUICtrlRead($Input)) = 0) Then
    msgbox(0,"", "You forgot to choose the priority.")
    ExitLoop
    EndIf
    If(StringLen(GUICtrlRead($Input1)) = 0) Then
    msgbox(0,"", "You forgot to choose the User.")
    ExitLoop
        EndIf
    If(StringLen(GUICtrlRead($Input2)) = 0) Then
        msgbox(0,"", "You forgot to Fill in a task to compleet.")
    ExitLoop
        EndIf
    If(StringLen(GUICtrlRead($Input3)) = 0) Then
        msgbox(0,"", "You forgot to Fill in a date")
    ExitLoop
        EndIf

    
    
;controlle  
    
If(StringLen(GUICtrlRead($Input)) = 0) Then;pc naam add
Else
$read = GUICtrlRead($Input) 
_FileWriteToLine("pc.txt", 1, "|"&$read&"                  ", 0)
$i_index =_GUICtrlComboInsertString($Combo,_GUICtrlComboGetCurSel($Combo),GUICtrlRead($Input))
GUICtrlSetData($Status,"Database Update Afgerond Totaal: " & $i_index &" stuks")
EndIf

If(StringLen(GUICtrlRead($Input1)) = 0) Then;firma  
    Else
$read1 = GUICtrlRead($Input1) 
_FileWriteToLine("firmanaam.txt", 1, "|"&$read1&"                  ", 0)
$i_index =_GUICtrlComboInsertString($Combo1,_GUICtrlComboGetCurSel($Combo1),GUICtrlRead($Input1))
EndIf

If(StringLen(GUICtrlRead($Input2)) = 0) Then;locatie/gebruiker
Else
$read2 = GUICtrlRead($Input2) 
_FileWriteToLine("user.txt", 1, "|"&$read2&"                                      ", 0)
$i_index =_GUICtrlComboInsertString($Combo2,_GUICtrlComboGetCurSel($Combo2),GUICtrlRead($Input2))
EndIf

If(StringLen(GUICtrlRead($Input3)) = 0) Then;serienr
    Else
$read3= GUICtrlRead($Input3) 
_FileWriteToLine("sn.txt", 1, "|"&$read3&"                                    ", 0)
$i_index =_GUICtrlComboInsertString($Combo3,_GUICtrlComboGetCurSel($Combo3),GUICtrlRead($Input3))
EndIf

ExitLoop
WEnd
 
    







        






EndSelect
WEnd

Share this post


Link to post
Share on other sites



Have you seen GEOsoft's Acces UDF


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
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
Sign in to follow this  
Followers 0