Beiträge von Alina
-
-
Moin Moin zusammen.
Ich habe jeden mal das gleiche, wenn ich an den PC gehe. Immer FF öffnen und dann die gleichen acht URL's (Inter- und Intranet) aufrufen, abarbeiten und gut. Aber kann man es Firefox irgendwie beibringen, diese acht URL's gleich zu öffnen. Das Problem, wenn ich es über die Einstellung der Startseite mache, muss ich es jedes mal wieder einrichten, wenn ich an einem anderen PC bin. Da ich aber IMMER einen USB-Stick am Schlüsselbund habe, dachte ich, ein Toolchen drauf und dann paßt das.
Jemand eine Idee? Muss dazu sagen, das ich mich mit FF im AutoIt-Bezig noch nie beschäftigt habe, außer eine Seite (URL) mal aufzurufen.
Edit. 1x FF öffnen, aber mit acht Tabs.
-
Manno, Pizza bestellt man auf Knopfdruck via SMS beim Pizzalieferanten Deines Vertrauens.
-
Vielleicht magst Du dir mal folgende Links anschauen:
- http://www.zabex.de/site/helferlein.html#hmi
- http://meinekleinewohnung.de/2013/04/schreibtisch-selber-bauen/
oder mal folgendes als Suchbegriff bei Google eingeben: lift selber bauen -
Den Fehler habe ich behoben. Jetzt kommen keine Daten mehr ins ListView.
AutoIt
Alles anzeigen;#include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <GUIListBox.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <SQLite.au3> #include <SQLite.dll.au3> #include <GuiListView.au3> ;Opt Opt("GUIOnEventMode", 0) ; Du benutzt den MsgLoop-Modus also muss hier "0" stehen oder die Zeile gleich ganz weglassen, weil "0" der Standardwert ist ;GUI Titel $Buchverwaltung = GUICreate("Buchverwaltung erstellt mit AutoIt", 1121, 629, 280, 183) ; Titel oben Mitte $Label1 = GUICtrlCreateLabel("~ ~ ~ B U C H V E R W A L T U N G ~ ~ ~", 304, 8, 516, 28) GUICtrlSetFont(-1, 16, 800, 0, "Arial") GUICtrlSetColor(-1, 0x0000FF) ; ListView $listview = GUICtrlCreateListView("ID |Titel|Autor|Verlag|Erscheinungsdatum|Genre|Preis|Einband|ISBN|Seiten|Lagerplatz|Serie|Bestellt|Gelesen|,Note,Zusatz,Information,Ausgeliehen_an,Ausgeliehen_am,Ausgeliehen_bis", 10,40,1105,168) $List1 = GUICtrlCreateList("", 8, 40, 1105, 168) ;~ GUICtrlSetFont(-1, 10, 400, 0, "Arial") ; Hauptbereich $Label2 = GUICtrlCreateLabel("Titel: ", 10, 274, 45, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input1 = GUICtrlCreateInput("", 160, 272, 361, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label3 = GUICtrlCreateLabel("Autor:", 10, 305, 45, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input2 = GUICtrlCreateInput("", 160, 302, 361, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label4 = GUICtrlCreateLabel("Verlag: ", 10, 335, 58, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input3 = GUICtrlCreateInput("", 160, 332, 361, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label5 = GUICtrlCreateLabel("Genre: ", 10, 365, 55, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input4 = GUICtrlCreateInput("", 160, 362, 361, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label6 = GUICtrlCreateLabel("Erscheinungsdatum: ", 10, 395, 149, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input5 = GUICtrlCreateInput("YYYYMMDD", 160, 392, 100, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label7 = GUICtrlCreateLabel("Serie: ", 267, 395, 50, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input6 = GUICtrlCreateInput("", 313, 392, 208, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label8 = GUICtrlCreateLabel("Preis: ", 10, 424, 146, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input7 = GUICtrlCreateInput("", 160, 422, 81, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label9 = GUICtrlCreateLabel("Lagerplatz: ", 267, 424, 85, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input8 = GUICtrlCreateInput("", 354, 422, 165, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label10 = GUICtrlCreateLabel("Einband: ", 10, 455, 70, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input9 = GUICtrlCreateInput("", 160, 452, 361, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label11 = GUICtrlCreateLabel("ISBN", 10, 485, 40, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input10 = GUICtrlCreateInput("", 160, 482, 361, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label12 = GUICtrlCreateLabel("Seiten: ", 10, 514, 57, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input11 = GUICtrlCreateInput("", 160, 512, 81, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label13 = GUICtrlCreateLabel("ausgeliehen an: ", 624, 272, 117, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input12 = GUICtrlCreateInput("", 760, 272, 121, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label14 = GUICtrlCreateLabel("ausgeliehen am: ", 624, 302, 122, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input13 = GUICtrlCreateInput("", 760, 302, 121, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label15 = GUICtrlCreateLabel("ausgeliehen bis: ", 624, 332, 121, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input14 = GUICtrlCreateInput("", 760, 334, 121, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label16 = GUICtrlCreateLabel("Bestellt: J/N", 624, 384, 86, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input15 = GUICtrlCreateInput("", 760, 384, 121, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label17 = GUICtrlCreateLabel("gelesen: J/N", 624, 414, 90, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input16 = GUICtrlCreateInput("", 760, 414, 121, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label18 = GUICtrlCreateLabel("Note: 1 - 6", 624, 444, 76, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input17 = GUICtrlCreateInput("", 760, 444, 121, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label19 = GUICtrlCreateLabel("Zusatz:", 624, 474, 53, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input18 = GUICtrlCreateInput("", 760, 472, 121, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label20 = GUICtrlCreateLabel("Information:", 896, 384, 84, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Edit1 = GUICtrlCreateEdit("", 896, 408, 217, 89) $Label22 = GUICtrlCreateLabel("-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------", 8, 256, 1105, 17) $Label23 = GUICtrlCreateLabel("-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------", 8, 544, 1105, 17) $Button16 = GUICtrlCreateButton("S U C H E N", 621, 509, 132, 25) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input19 = GUICtrlCreateInput("Suchbegriff hier eingeben", 760, 507, 347, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label24 = GUICtrlCreateLabel("Lfd.-Nr:", 350, 515, 55, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input20 = GUICtrlCreateInput("", 415, 512, 105, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") GUICtrlSetData(-1, "000002") GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif") ; unterer Bereich $Label26 = GUICtrlCreateLabel("Büchermenge: ", 13, 595, 113, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input22 = GUICtrlCreateInput("", 128, 592, 81, 26) ; hier soll die ges. Bücheranzahl eingefügt werden und nicht veränderbar durch Anwender GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label27 = GUICtrlCreateLabel("Ges. Seitenzahl:", 270, 596, 117, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input23 = GUICtrlCreateInput(" ", 394, 592, 81, 26) ; hier soll die ges. Seitenzahl eingefügt werden und nicht veränderbar durch Anwender GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label28 = GUICtrlCreateLabel("Ges. Buch NP:", 572, 595, 106, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") GUICtrlCreateInput("", 680, 592, 121, 26) ; hier soll der ges. Bücherwert eingefügt werden und nicht veränderbar durch Anwender GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Button20 = GUICtrlCreateButton("Speichern", 991, 592, 121, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") ; Ausleihbutton $Button17 = GUICtrlCreateButton("Ausleihen", 888, 272, 227, 25) ; DK 1 / 2 / 3 $Button18 = GUICtrlCreateButton("DK 1 / 2 / 3", 894, 334, 99, 26) ; D 1 / 2 $Button19 = GUICtrlCreateButton("D 1 / 2", 1012, 334, 99, 25) ; GUI anzeigen GUISetState(@SW_SHOW) ; !!! Datei lösche ich hier nur, damit ich sie nicht manuell löschen muss in der Übungsphase !!! FileDelete(@ScriptDir & "\buchverwaltung.db") ; DLL Pfad _SQLite_Startup(@ScriptDir & "\sqlite3.dll", False, 1) ; BugFix Idee, da DLL ja nicht mehr mitgeliefert wird ; gibt die SQL Version in die Console aus ConsoleWrite("_SQLite_LibVersion=" & _SQLite_LibVersion() & @CRLF) ; Datenbank öffnen, ggf. erstellen Global $g_db_Database = _SQLite_Open(@ScriptDir & "\buchverwaltung.db") ; Datenbanktabelle _SQLite_Exec($g_db_Database, "CREATE TABLE IF NOT EXISTS Buchverwaltung(ID INTEGER PRIMARY KEY AUTOINCREMENT,Titel,Autor,Verlag,Erscheinungsdatum,Genre,Preis,Einband,ISBN,Seiten,Lagerplatz, Serie,Bestellt,Gelesen,Note,Zusatz,Information,Ausgeliehen_an,Ausgeliehen_am,Ausgeliehen_bis);") ; jeweils ein Datensatz wird dazu geschrieben, Daten sind von Enno Jüders zur Verfügung gestellt. _SQLite_Exec(-1, "INSERT INTO Buchverwaltung VALUES('1','13 Tage','Giambanco, Valentina','Droemer Knaur','2014.03.03','Thriller','14.99','Hardcover','9783426513996','576','R1-F2','','','N','','','','','..','..');") _SQLite_Exec(-1, "INSERT INTO Buchverwaltung VALUES('2','Abgründe','Strobel, Arno','Loewe','2014.03.10','Thriller-J','9.95','Taschenbuch','9783785578643','240','R1-F2','','','N','','','','','..','..');") _SQLite_Exec(-1, "INSERT INTO Buchverwaltung VALUES('3','Agent 6','Smith, Tom Rob','Goldmann','2011.09.14','Thriller','9.99','Taschenbuch','9783442546770','540','R1-F2','Leo Demidow Bd.3','','N','','','','','..','..');") _SQLite_Exec(-1, "INSERT INTO Buchverwaltung VALUES('4','Bedroht','Koppen, Hans','Heyne','2013.03.27','Thriller','14.99','Taschenbuch','9783453268012','411','R1-F2','','','J','1','','','','..','..');") _SQLite_Exec(-1, "INSERT INTO Buchverwaltung VALUES('5','Belladonna','Slaughter, Karin','rororo','2003.03.03','Thriller','6.00','Taschenbuch','9783499239140','413','R1-F1','Grant County Bd.1','','J','1','','','','..','..');") _SQLite_Exec(-1, "INSERT INTO Buchverwaltung VALUES('6','Bis zum letzten Atemzug','Baldacci, David','Bastei Lübbe','2011.04.01','Thriller','9.99','Taschenbuch','9783404165537','574','R1-F2','King & Maxwell Bd. 4','austauschen','N','','','','','..','..');") _SQLite_Exec(-1, "INSERT INTO Buchverwaltung VALUES('7','Bittere Wunden','Slaughter, Karin','blanvalet','2014.09.01','Thriller','19.99','Hardcover','9783764505172','576','R1-F1','Georgia Bd.4','','J','2','','','','..','..');") Global $hQuery, $aNames, $aRow _SQLite_Query(-1, "SELECT ROWID,* FROM Buchverwaltung;", $hQuery) While _SQLite_FetchData($hQuery, $aRow, False, False) = $SQLITE_OK ; Read Out the next Row GUICtrlCreateListViewItem(_ArrayToString($aRow, '|', 1, 17), $listview) WEnd _SQLite_QueryFinalize($hQuery) _GUICtrlListView_RegisterSortCallBack($listview) ; CallBack registrieren zum sortieren While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $listview _GUICtrlListView_SortItems($listview, GUICtrlGetState($listview)) ; hier wird das Listview sortiert Case $Button20 _ds_plus EndSwitch WEnd Func _Exit() ; Datenbank schließen und down. _GUICtrlListView_UnRegisterSortCallBack($listview) _SQLite_Close($g_db_Database) _SQLite_Shutdown() EndFunc ; Datensatz von GUI2DB Func _ds_plus($id) Local $aworte $inputs1 = GUICtrlRead($Input1) ; Titel $inputs2 = GUICtrlRead($Input2) ; Autor $inputs3 = GUICtrlRead($Input3) ; Verlag $inputs5 = GUICtrlRead($Input5) ; Erscheinungsdatum $inputs4 = GUICtrlRead($Input4) ; Genre $inputs7 = GUICtrlRead($Input7) ; Preis $inputs9 = GUICtrlRead($Input9) ; Einband $inputs10 = GUICtrlRead($Input10) ; ISBN $inputs11 = GUICtrlRead($Input11) ; Seiten $inputs8= GUICtrlRead($Input8) ; Lagerplatz $inputs6 = GUICtrlRead($Input6) ; Serie $inputs15 = GUICtrlRead($Input15) ; Bestellt $inputs16 = GUICtrlRead($Input16) ; Gelesen $inputs17 = GUICtrlRead($Input17) ; Note $inputs18 = GUICtrlRead($Input18) ; Zusatz $edits1 = GUICtrlRead($Edit1) ; Information <------- ??? $inputs12 = GUICtrlRead($Input12) ; Ausgeliehen_an $inputs13 = GUICtrlRead($Input13) ; Ausgeliehen_am $inputs14 = GUICtrlRead($Input14) ; Ausgeliehen_bis _SQLite_QuerySingleRow(-1,"SELECT id FROM Buchverwaltung WHERE id='"&$id&"'",$aworte) If $aworte[0] <> "" Then _SQLite_Exec(-1,"UPDATE datas SET Titel='"&$inputs1&"', Autor='"&$inputs2&"',Verlag='"&$inputs3&"', Erscheinungsdatum='"&$inputs5&"', Genre='"&$inputs4&"',Preis='"&$inputs7&"',Einband='"&$inputs9&"',ISBN='"&$inputs10&"',Seiten='"&$inputs11&"',Lagerplatz='"&$inputs8&"',Serie='"&$inputs6&"',Bestellt='"&$inputs15&"',Gelesen='"&$inputs16&"',Note='"&$inputs17&"',Zusatz='"&$inputs18&"', Information='"&$edits1&"',Ausgeliehen_an='"&$inputs12&"',Ausgeliehen_am='"&$inputs13&"',Ausgeliehen_bis='"&$inputs14&"' WHERE id='"&$id&"'") Else _SQLite_Exec(-1,"INSERT INTO datas (ID,Titel,Autor,Verlag,Erscheinungsdatum,Genre,Preis,Einband,ISBN,Seiten,Lagerplatz, Serie,Bestellt,Gelesen,Note,Zusatz,Information,Ausgeliehen_an,Ausgeliehen_am,Ausgeliehen_bis) VALUES ('"&$id&"','"&$inputs1&"','"&$inputs2&"','"&$inputs3&"','"&$inputs4&"','"&$inputs5&"','"&$inputs4&"','"&$inputs7&"','"&$inputs9&"','"&$inputs10&"','"&$inputs11&"','"&$inputs8&"','"&$inputs6&"','"&$inputs15&"','"&$inputs16&"','"&$inputs17&"','"&$inputs18&"','"&$edits1&"','"&$inputs12&"','"&$inputs13&"','"&$inputs14&"');") EndIf _GUICtrlListView_SortItems($listview, GUICtrlGetState($listview)) EndFunc
-
Vier Stunden geschlafen und nun bin ich soweit, das ich "nur noch" eine Fehlermeldung bezüglich der Function bekomme.
Er bekommt die benötigte ID nicht. Ich glaube sonst habe ich es soweit.AutoIt
Alles anzeigen;#include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <GUIListBox.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <SQLite.au3> #include <SQLite.dll.au3> #include <GuiListView.au3> ;Opt Opt("GUIOnEventMode", 0) ; Du benutzt den MsgLoop-Modus also muss hier "0" stehen oder die Zeile gleich ganz weglassen, weil "0" der Standardwert ist ;GUI Titel $Buchverwaltung = GUICreate("Buchverwaltung erstellt mit AutoIt", 1121, 629, 280, 183) ; Titel oben Mitte $Label1 = GUICtrlCreateLabel("~ ~ ~ B U C H V E R W A L T U N G ~ ~ ~", 304, 8, 516, 28) GUICtrlSetFont(-1, 16, 800, 0, "Arial") GUICtrlSetColor(-1, 0x0000FF) ; ListView $listview = GUICtrlCreateListView("ID|Titel|Autor|Verlag|E-Datum|Genre|Preis|Einband|ISBN|Seiten|Lager|Serie|Bestellt|Gelesen|Note|Zusatz|Information", 10,40,1105,168) ;~ $List1 = GUICtrlCreateList("", 8, 40, 1105, 168) ;~ GUICtrlSetFont(-1, 10, 400, 0, "Arial") ; Hauptbereich $Label2 = GUICtrlCreateLabel("Titel: ", 10, 274, 45, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input1 = GUICtrlCreateInput("", 160, 272, 361, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label3 = GUICtrlCreateLabel("Autor:", 10, 305, 45, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input2 = GUICtrlCreateInput("", 160, 302, 361, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label4 = GUICtrlCreateLabel("Verlag: ", 10, 335, 58, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input3 = GUICtrlCreateInput("", 160, 332, 361, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label5 = GUICtrlCreateLabel("Genre: ", 10, 365, 55, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input4 = GUICtrlCreateInput("", 160, 362, 361, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label6 = GUICtrlCreateLabel("Erscheinungsdatum: ", 10, 395, 149, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input5 = GUICtrlCreateInput("YYYYMMDD", 160, 392, 100, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label7 = GUICtrlCreateLabel("Serie: ", 267, 395, 50, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input6 = GUICtrlCreateInput("", 313, 392, 208, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label8 = GUICtrlCreateLabel("Preis: ", 10, 424, 146, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input7 = GUICtrlCreateInput("", 160, 422, 81, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label9 = GUICtrlCreateLabel("Lagerplatz: ", 267, 424, 85, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input8 = GUICtrlCreateInput("", 354, 422, 165, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label10 = GUICtrlCreateLabel("Einband: ", 10, 455, 70, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input9 = GUICtrlCreateInput("", 160, 452, 361, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label11 = GUICtrlCreateLabel("ISBN", 10, 485, 40, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input10 = GUICtrlCreateInput("", 160, 482, 361, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label12 = GUICtrlCreateLabel("Seiten: ", 10, 514, 57, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input11 = GUICtrlCreateInput("", 160, 512, 81, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label13 = GUICtrlCreateLabel("ausgeliehen an: ", 624, 272, 117, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input12 = GUICtrlCreateInput("", 760, 272, 121, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label14 = GUICtrlCreateLabel("ausgeliehen am: ", 624, 302, 122, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input13 = GUICtrlCreateInput("", 760, 302, 121, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label15 = GUICtrlCreateLabel("ausgeliehen bis: ", 624, 332, 121, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input14 = GUICtrlCreateInput("", 760, 334, 121, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label16 = GUICtrlCreateLabel("Bestellt: J/N", 624, 384, 86, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input15 = GUICtrlCreateInput("", 760, 384, 121, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label17 = GUICtrlCreateLabel("gelesen: J/N", 624, 414, 90, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input16 = GUICtrlCreateInput("", 760, 414, 121, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label18 = GUICtrlCreateLabel("Note: 1 - 6", 624, 444, 76, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input17 = GUICtrlCreateInput("", 760, 444, 121, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label19 = GUICtrlCreateLabel("Zusatz:", 624, 474, 53, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input18 = GUICtrlCreateInput("", 760, 472, 121, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label20 = GUICtrlCreateLabel("Information:", 896, 384, 84, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Edit1 = GUICtrlCreateEdit("", 896, 408, 217, 89) $Label22 = GUICtrlCreateLabel("-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------", 8, 256, 1105, 17) $Label23 = GUICtrlCreateLabel("-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------", 8, 544, 1105, 17) $Button16 = GUICtrlCreateButton("S U C H E N", 621, 509, 132, 25) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input19 = GUICtrlCreateInput("Suchbegriff hier eingeben", 760, 507, 347, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label24 = GUICtrlCreateLabel("Lfd.-Nr:", 350, 515, 55, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input20 = GUICtrlCreateInput("", 415, 512, 105, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") GUICtrlSetData(-1, "000002") GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif") ; unterer Bereich $Label26 = GUICtrlCreateLabel("Büchermenge: ", 13, 595, 113, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input22 = GUICtrlCreateInput("", 128, 592, 81, 26) ; hier soll die ges. Bücheranzahl eingefügt werden und nicht veränderbar durch Anwender GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label27 = GUICtrlCreateLabel("Ges. Seitenzahl:", 270, 596, 117, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input23 = GUICtrlCreateInput(" ", 394, 592, 81, 26) ; hier soll die ges. Seitenzahl eingefügt werden und nicht veränderbar durch Anwender GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label28 = GUICtrlCreateLabel("Ges. Buch NP:", 572, 595, 106, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") GUICtrlCreateInput("", 680, 592, 121, 26) ; hier soll der ges. Bücherwert eingefügt werden und nicht veränderbar durch Anwender GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Button20 = GUICtrlCreateButton("Speichern", 991, 592, 121, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") ; Ausleihbutton $Button17 = GUICtrlCreateButton("Ausleihen", 888, 272, 227, 25) ; DK 1 / 2 / 3 $Button18 = GUICtrlCreateButton("DK 1 / 2 / 3", 894, 334, 99, 26) ; D 1 / 2 $Button19 = GUICtrlCreateButton("D 1 / 2", 1012, 334, 99, 25) ; GUI anzeigen GUISetState(@SW_SHOW) ; !!! Datei lösche ich hier nur, damit ich sie nicht manuell löschen muss in der Übungsphase !!! FileDelete(@ScriptDir & "\buchverwaltung.db") ; DLL Pfad _SQLite_Startup(@ScriptDir & "\sqlite3.dll", False, 1) ; BugFix Idee, da DLL ja nicht mehr mitgeliefert wird ; gibt die SQL Version in die Console aus ConsoleWrite("_SQLite_LibVersion=" & _SQLite_LibVersion() & @CRLF) ; Datenbank öffnen, ggf. erstellen Global $g_db_Database = _SQLite_Open(@ScriptDir & "\buchverwaltung.db") ; Datenbanktabelle _SQLite_Exec($g_db_Database, "CREATE TABLE IF NOT EXISTS Buchverwaltung(ID INTEGER PRIMARY KEY AUTOINCREMENT,Titel,Autor,Verlag,Erscheinungsdatum,Genre,Preis,Einband,ISBN,Seiten,Lagerplatz, Serie,Bestellt,Gelesen,Note,Zusatz,Information,Ausgeliehen_an,Ausgeliehen_am,Ausgeliehen_bis);") ; jeweils ein Datensatz wird dazu geschrieben, Daten sind von Enno Jüders zur Verfügung gestellt. _SQLite_Exec(-1, "INSERT INTO Buchverwaltung VALUES('1','13 Tage','Giambanco, Valentina','Droemer Knaur','2014.03.03','Thriller','14.99','Hardcover','9783426513996','576','R1-F2','','','N','','','','','..','..');") _SQLite_Exec(-1, "INSERT INTO Buchverwaltung VALUES('2','Abgründe','Strobel, Arno','Loewe','2014.03.10','Thriller-J','9.95','Taschenbuch','9783785578643','240','R1-F2','','','N','','','','','..','..');") _SQLite_Exec(-1, "INSERT INTO Buchverwaltung VALUES('3','Agent 6','Smith, Tom Rob','Goldmann','2011.09.14','Thriller','9.99','Taschenbuch','9783442546770','540','R1-F2','Leo Demidow Bd.3','','N','','','','','..','..');") _SQLite_Exec(-1, "INSERT INTO Buchverwaltung VALUES('4','Bedroht','Koppen, Hans','Heyne','2013.03.27','Thriller','14.99','Taschenbuch','9783453268012','411','R1-F2','','','J','1','','','','..','..');") _SQLite_Exec(-1, "INSERT INTO Buchverwaltung VALUES('5','Belladonna','Slaughter, Karin','rororo','2003.03.03','Thriller','6.00','Taschenbuch','9783499239140','413','R1-F1','Grant County Bd.1','','J','1','','','','..','..');") _SQLite_Exec(-1, "INSERT INTO Buchverwaltung VALUES('6','Bis zum letzten Atemzug','Baldacci, David','Bastei Lübbe','2011.04.01','Thriller','9.99','Taschenbuch','9783404165537','574','R1-F2','King & Maxwell Bd. 4','austauschen','N','','','','','..','..');") _SQLite_Exec(-1, "INSERT INTO Buchverwaltung VALUES('7','Bittere Wunden','Slaughter, Karin','blanvalet','2014.09.01','Thriller','19.99','Hardcover','9783764505172','576','R1-F1','Georgia Bd.4','','J','2','','','','..','..');") Global $hQuery, $aNames, $aRow _SQLite_Query(-1, "SELECT ROWID,* FROM Buchverwaltung;", $hQuery) While _SQLite_FetchData($hQuery, $aRow, False, False) = $SQLITE_OK ; Read Out the next Row GUICtrlCreateListViewItem(_ArrayToString($aRow, '|', 1, 17), $listview) WEnd _SQLite_QueryFinalize($hQuery) _GUICtrlListView_RegisterSortCallBack($listview) ; CallBack registrieren zum sortieren While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $listview _GUICtrlListView_SortItems($listview, GUICtrlGetState($listview)) ; hier wird das Listview sortiert Case $Button20 ds_plus EndSwitch WEnd Func _Exit() ; Datenbank schließen und down. _GUICtrlListView_UnRegisterSortCallBack($listview) _SQLite_Close($g_db_Database) _SQLite_Shutdown() EndFunc ; Datensatz von GUI2DB Func ds_plus($id) Local $aworte $inputs1 = GUICtrlRead($Input1) ; Titel $inputs2 = GUICtrlRead($Input2) ; Autor $inputs3 = GUICtrlRead($Input3) ; Verlag $inputs5 = GUICtrlRead($Input5) ; Erscheinungsdatum $inputs4 = GUICtrlRead($Input4) ; Genre $inputs7 = GUICtrlRead($Input7) ; Preis $inputs9 = GUICtrlRead($Input9) ; Einband $inputs10 = GUICtrlRead($Input10) ; ISBN $inputs11 = GUICtrlRead($Input11) ; Seiten $inputs8= GUICtrlRead($Input8) ; Lagerplatz $inputs6 = GUICtrlRead($Input6) ; Serie $inputs15 = GUICtrlRead($Input15) ; Bestellt $inputs16 = GUICtrlRead($Input16) ; Gelesen $inputs17 = GUICtrlRead($Input17) ; Note $inputs18 = GUICtrlRead($Input18) ; Zusatz $edits1 = GUICtrlRead($Edit1) ; Information <------- ??? $inputs12 = GUICtrlRead($Input12) ; Ausgeliehen_an $inputs13 = GUICtrlRead($Input13) ; Ausgeliehen_am $inputs14 = GUICtrlRead($Input14) ; Ausgeliehen_bis _SQLite_QuerySingleRow(-1,"SELECT id FROM Buchverwaltung WHERE id='"&$id&"'",$aworte) If $aworte[0] <> "" Then _SQLite_Exec(-1,"UPDATE datas SET Titel='"&$inputs1&"', Autor='"&$inputs2&"',Verlag='"&$inputs3&"', Erscheinungsdatum='"&$inputs5&"', Genre='"&$inputs4&"',Preis='"&$inputs7&"',Einband='"&$inputs9&"',ISBN='"&$inputs10&"',Seiten='"&$inputs11&"',Lagerplatz='"&$inputs8&"',Serie='"&$inputs6&"',Bestellt='"&$inputs15&"',Gelesen='"&$inputs16&"',Note='"&$inputs17&"',Zusatz='"&$inputs18&"', Information='"&$edits1&"',Ausgeliehen_an='"&$inputs12&"',Ausgeliehen_am='"&$inputs13&"',Ausgeliehen_bis='"&$inputs14&"' WHERE id='"&$id&"'") Else _SQLite_Exec(-1,"INSERT INTO datas (ID,Titel,Autor,Verlag,Erscheinungsdatum,Genre,Preis,Einband,ISBN,Seiten,Lagerplatz, Serie,Bestellt,Gelesen,Note,Zusatz,Information,Ausgeliehen_an,Ausgeliehen_am,Ausgeliehen_bis) VALUES ('"&$id&"','"&$inputs1&"','"&$inputs2&"','"&$inputs3&"','"&$inputs4&"','"&$inputs5&"','"&$inputs4&"','"&$inputs7&"','"&$inputs9&"','"&$inputs10&"','"&$inputs11&"','"&$inputs8&"','"&$inputs6&"','"&$inputs15&"','"&$inputs16&"','"&$inputs17&"','"&$inputs18&"','"&$edits1&"','"&$inputs12&"','"&$inputs13&"','"&$inputs14&"');") EndIf _GUICtrlListView_SortItems($listview, GUICtrlGetState($listview)) EndFunc
-
Peter, da schließe ich mich auch mal an. Ich nutze aber auf einem Display ISN und auf dem anderen SciTe. Ist eine gute Kombi.
Weiß nämlich nicht ob OrganizeIncludes im ISN Studio funktioniert. Habe da noch nicht so den Überblick.
Reiterfuchs, sehen dir deines mal an und schließe neue Freundshcaften ;) -
Das hier ist das Script, bei dem ich die letzte Funktion ( ds_plus($id) ) nicht lauffähig bekomme:
AutoIt
Alles anzeigen;#include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <GUIListBox.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <SQLite.au3> #include <SQLite.dll.au3> #include <GuiListView.au3> ;Opt Opt("GUIOnEventMode", 0) ; Du benutzt den MsgLoop-Modus also muss hier "0" stehen oder die Zeile gleich ganz weglassen, weil "0" der Standardwert ist ;GUI Titel $Buchverwaltung = GUICreate("Buchverwaltung erstellt mit AutoIt", 1121, 629, 280, 183) ; Titel oben Mitte $Label1 = GUICtrlCreateLabel("~ ~ ~ B U C H V E R W A L T U N G ~ ~ ~", 304, 8, 516, 28) GUICtrlSetFont(-1, 16, 800, 0, "Arial") GUICtrlSetColor(-1, 0x0000FF) ; ListView $listview = GUICtrlCreateListView("ID|Titel|Autor|Verlag|E-Datum|Genre|Preis|Einband|ISBN|Seiten|Lager|Serie|Bestellt|Gelesen|Note|Zusatz|Information", 10,40,1105,168) ;~ $List1 = GUICtrlCreateList("", 8, 40, 1105, 168) ;~ GUICtrlSetFont(-1, 10, 400, 0, "Arial") ; Hauptbereich $Label2 = GUICtrlCreateLabel("Titel: ", 10, 274, 45, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input1 = GUICtrlCreateInput("", 160, 272, 361, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label3 = GUICtrlCreateLabel("Autor:", 10, 305, 45, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input2 = GUICtrlCreateInput("", 160, 302, 361, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label4 = GUICtrlCreateLabel("Verlag: ", 10, 335, 58, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input3 = GUICtrlCreateInput("", 160, 332, 361, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label5 = GUICtrlCreateLabel("Genre: ", 10, 365, 55, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input4 = GUICtrlCreateInput("", 160, 362, 361, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label6 = GUICtrlCreateLabel("Erscheinungsdatum: ", 10, 395, 149, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input5 = GUICtrlCreateInput("YYYYMMDD", 160, 392, 100, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label7 = GUICtrlCreateLabel("Serie: ", 267, 395, 50, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input6 = GUICtrlCreateInput("", 313, 392, 208, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label8 = GUICtrlCreateLabel("Preis: ", 10, 424, 146, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input7 = GUICtrlCreateInput("", 160, 422, 81, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label9 = GUICtrlCreateLabel("Lagerplatz: ", 267, 424, 85, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input8 = GUICtrlCreateInput("", 354, 422, 165, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label10 = GUICtrlCreateLabel("Einband: ", 10, 455, 70, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input9 = GUICtrlCreateInput("", 160, 452, 361, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label11 = GUICtrlCreateLabel("ISBN", 10, 485, 40, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input10 = GUICtrlCreateInput("", 160, 482, 361, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label12 = GUICtrlCreateLabel("Seiten: ", 10, 514, 57, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input11 = GUICtrlCreateInput("", 160, 512, 81, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label13 = GUICtrlCreateLabel("ausgeliehen an: ", 624, 272, 117, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input12 = GUICtrlCreateInput("", 760, 272, 121, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label14 = GUICtrlCreateLabel("ausgeliehen am: ", 624, 302, 122, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input13 = GUICtrlCreateInput("", 760, 302, 121, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label15 = GUICtrlCreateLabel("ausgeliehen bis: ", 624, 332, 121, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input14 = GUICtrlCreateInput("", 760, 334, 121, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label16 = GUICtrlCreateLabel("Bestellt: J/N", 624, 384, 86, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input15 = GUICtrlCreateInput("", 760, 384, 121, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label17 = GUICtrlCreateLabel("gelesen: J/N", 624, 414, 90, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input16 = GUICtrlCreateInput("", 760, 414, 121, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label18 = GUICtrlCreateLabel("Note: 1 - 6", 624, 444, 76, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input17 = GUICtrlCreateInput("", 760, 444, 121, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label19 = GUICtrlCreateLabel("Zusatz:", 624, 474, 53, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input18 = GUICtrlCreateInput("", 760, 472, 121, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label20 = GUICtrlCreateLabel("Information:", 896, 384, 84, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Edit1 = GUICtrlCreateEdit("", 896, 408, 217, 89) $Label22 = GUICtrlCreateLabel("-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------", 8, 256, 1105, 17) $Label23 = GUICtrlCreateLabel("-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------", 8, 544, 1105, 17) $Button16 = GUICtrlCreateButton("S U C H E N", 621, 509, 132, 25) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input19 = GUICtrlCreateInput("Suchbegriff hier eingeben", 760, 507, 347, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label24 = GUICtrlCreateLabel("Lfd.-Nr:", 350, 515, 55, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input20 = GUICtrlCreateInput("", 415, 512, 105, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") GUICtrlSetData(-1, "000002") GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif") ; unterer Bereich $Label26 = GUICtrlCreateLabel("Büchermenge: ", 13, 595, 113, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input22 = GUICtrlCreateInput("", 128, 592, 81, 26) ; hier soll die ges. Bücheranzahl eingefügt werden und nicht veränderbar durch Anwender GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label27 = GUICtrlCreateLabel("Ges. Seitenzahl:", 270, 596, 117, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input23 = GUICtrlCreateInput(" ", 394, 592, 81, 26) ; hier soll die ges. Seitenzahl eingefügt werden und nicht veränderbar durch Anwender GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label28 = GUICtrlCreateLabel("Ges. Buch NP:", 572, 595, 106, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") GUICtrlCreateInput("", 680, 592, 121, 26) ; hier soll der ges. Bücherwert eingefügt werden und nicht veränderbar durch Anwender GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Button20 = GUICtrlCreateButton("Speichern", 991, 592, 121, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") ; Ausleihbutton $Button17 = GUICtrlCreateButton("Ausleihen", 888, 272, 227, 25) ; DK 1 / 2 / 3 $Button18 = GUICtrlCreateButton("DK 1 / 2 / 3", 894, 334, 99, 26) ; D 1 / 2 $Button19 = GUICtrlCreateButton("D 1 / 2", 1012, 334, 99, 25) ; GUI anzeigen GUISetState(@SW_SHOW) ; !!! Datei lösche ich hier nur, damit ich sie nicht manuell löschen muss in der Übungsphase !!! FileDelete(@ScriptDir & "\buchverwaltung.db") ; DLL Pfad _SQLite_Startup(@ScriptDir & "\sqlite3.dll", False, 1) ; BugFix Idee, da DLL ja nicht mehr mitgeliefert wird ; gibt die SQL Version in die Console aus ConsoleWrite("_SQLite_LibVersion=" & _SQLite_LibVersion() & @CRLF) ; Datenbank öffnen, ggf. erstellen Global $g_db_Database = _SQLite_Open(@ScriptDir & "\buchverwaltung.db") ; Datenbanktabelle _SQLite_Exec($g_db_Database, "CREATE TABLE IF NOT EXISTS Buchverwaltung(ID INTEGER PRIMARY KEY AUTOINCREMENT,Titel,Autor,Verlag,Erscheinungsdatum,Genre,Preis,Einband,ISBN,Seiten,Lagerplatz, Serie,Bestellt,Gelesen,Note,Zusatz,Information,Ausgeliehen_an,Ausgeliehen_am,Ausgeliehen_bis);") ; jeweils ein Datensatz wird dazu geschrieben, Daten sind von Enno Jüders zur Verfügung gestellt. _SQLite_Exec(-1, "INSERT INTO Buchverwaltung VALUES('1','13 Tage','Giambanco, Valentina','Droemer Knaur','2014.03.03','Thriller','14.99','Hardcover','9783426513996','576','R1-F2','','','N','','','','','..','..');") _SQLite_Exec(-1, "INSERT INTO Buchverwaltung VALUES('2','Abgründe','Strobel, Arno','Loewe','2014.03.10','Thriller-J','9.95','Taschenbuch','9783785578643','240','R1-F2','','','N','','','','','..','..');") _SQLite_Exec(-1, "INSERT INTO Buchverwaltung VALUES('3','Agent 6','Smith, Tom Rob','Goldmann','2011.09.14','Thriller','9.99','Taschenbuch','9783442546770','540','R1-F2','Leo Demidow Bd.3','','N','','','','','..','..');") _SQLite_Exec(-1, "INSERT INTO Buchverwaltung VALUES('4','Bedroht','Koppen, Hans','Heyne','2013.03.27','Thriller','14.99','Taschenbuch','9783453268012','411','R1-F2','','','J','1','','','','..','..');") _SQLite_Exec(-1, "INSERT INTO Buchverwaltung VALUES('5','Belladonna','Slaughter, Karin','rororo','2003.03.03','Thriller','6.00','Taschenbuch','9783499239140','413','R1-F1','Grant County Bd.1','','J','1','','','','..','..');") _SQLite_Exec(-1, "INSERT INTO Buchverwaltung VALUES('6','Bis zum letzten Atemzug','Baldacci, David','Bastei Lübbe','2011.04.01','Thriller','9.99','Taschenbuch','9783404165537','574','R1-F2','King & Maxwell Bd. 4','austauschen','N','','','','','..','..');") _SQLite_Exec(-1, "INSERT INTO Buchverwaltung VALUES('7','Bittere Wunden','Slaughter, Karin','blanvalet','2014.09.01','Thriller','19.99','Hardcover','9783764505172','576','R1-F1','Georgia Bd.4','','J','2','','','','..','..');") Global $hQuery, $aNames, $aRow _SQLite_Query(-1, "SELECT ROWID,* FROM Buchverwaltung;", $hQuery) While _SQLite_FetchData($hQuery, $aRow, False, False) = $SQLITE_OK ; Read Out the next Row GUICtrlCreateListViewItem(_ArrayToString($aRow, '|', 1, 17), $listview) WEnd _SQLite_QueryFinalize($hQuery) _GUICtrlListView_RegisterSortCallBack($listview) ; CallBack registrieren zum sortieren While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $listview _GUICtrlListView_SortItems($listview, GUICtrlGetState($listview)) ; hier wird das Listview sortiert Case $Button20 ds_plus EndSwitch WEnd Func _Exit() ; Datenbank schließen und down. _GUICtrlListView_UnRegisterSortCallBack($listview) _SQLite_Close($g_db_Database) _SQLite_Shutdown() EndFunc Func ds_plus($id) Local $aworte $inputs1 = GUICtrlRead($Input1) ; Titel $inputs2 = GUICtrlRead($Input2) ; Autor $inputs3 = GUICtrlRead($Input3) ; Verlag $inputs5 = GUICtrlRead($Input5) ; Erscheinungsdatum $inputs4 = GUICtrlRead($Input4) ; Genre $inputs7 = GUICtrlRead($Input7) ; Preis $inputs9 = GUICtrlRead($Input9) ; Einband $inputs10 = GUICtrlRead($Input10) ; ISBN $inputs11 = GUICtrlRead($Input11) ; Seiten $inputs8= GUICtrlRead($Input8) ; Lagerplatz $inputs6 = GUICtrlRead($Input6) ; Serie $inputs15 = GUICtrlRead($Input15) ; Bestellt $inputs16 = GUICtrlRead($Input16) ; Gelesen $inputs17 = GUICtrlRead($Input17) ; Note $inputs18 = GUICtrlRead($Input18) ; Zusatz $edits1 = GUICtrlRead($Edit1) ; Information <------- ??? $inputs12 = GUICtrlRead($Input12) ; Ausgeliehen_an $inputs13 = GUICtrlRead($Input13) ; Ausgeliehen_am $inputs14 = GUICtrlRead($Input14) ; Ausgeliehen_bis _SQLite_QuerySingleRow(-1,"SELECT id FROM Buchverwaltung WHERE id='"&$id&"'",$aworte) If $aworte[0] <> "" Then _SQLite_Exec(-1,"UPDATE datas SET Titel='"&$inputs1&"', Autor='"&$inputs2&"', Verlag='"&$inputs3&"', Erscheinungsdatum='"&$inputs5&"', Genre='"&$inputs4&"',Preis='"&$inputs7&"',Einband='"&$inputs9&"',ISBN='"&$inputs10&"',Seiten='"&$inputs11&"',Lagerplatz='"&$inputs8&"',Serie='"&$inputs6&"',Bestellt='"&$inputs15&"',Gelesen='"&$inputs16&"',Note='"&$inputs17&"',Zusatz='"&$inputs18&"', Information='"&$edits1&"',Ausgeliehen_an='"&$inputs12&"',Ausgeliehen_am='"&$inputs13&"',Ausgeliehen_bis='"&$inputs14&'" "WHERE id='"&$id&"'") Else _SQLite_Exec(-1,"INSERT INTO datas (ID,Titel,Autor,Verlag,Erscheinungsdatum,Genre,Preis,Einband,ISBN,Seiten,Lagerplatz, Serie,Bestellt,Gelesen,Note,Zusatz,Information,Ausgeliehen_an,Ausgeliehen_am,Ausgeliehen_bis) VALUES ('"&--?????--&"','"&$inputs1&"','"&$inputs2&"','"&$inputs3&"','"&$inputs4&"','"&$inputs5&"','"&$inputs4&"','"&$inputs7&"','"&$inputs9&"','"&$inputs10&"','"&$inputs11&"','"&$inputs8&"','"&$inputs6&"','"&$inputs15&"','"&$inputs16&"','"&$inputs17&"','"&$inputs18&"','"&$edits1&"','"&$inputs12&"','"&$inputs13&"','"&$inputs14&"');") EndIf _GUICtrlListView_SortItems($listview, GUICtrlGetState($listview)) EndFunc
Das Problem ist u. a. folgendes: VALUES ('"&--?????--&"','"&$inputs1&"', <---- --?????-- muss doch die ID sein. Nur wie?
-
Du bist zufrieden undd as Problem ist gelöst?
Tust DU uns dann einen Gefallen und stellst den Beitrag BITTE auf "gelöst"?
Danke Dir und beehre uns bald wieder. -
Ich danke Dir für die Erklärung und 'Ja', ich habe das Programm im Vordergrund laufen.
-
@Peter S. Taler sag mal nichts gegen Bill-Regale. Ich habe zwölf stück und die stehen voller Bücher alle ohne sie an die Wand zu stellen.
@Yaerox bei mir sieht es genauso aus, das ich um die Ecke möchte mit meinem Büro. 2,30 m x 4,90 m. Und ich habe heute in Dänemark eine gute Idee gesehen wie man die Beine der Höhe anpassen kann. Aber da muss ich mal sehen, ob ich das nur dort mache, wo ich dann am "Schreibtisch" bin. Ich arbeite sehr sehr viel im Stehen und dazu muss der Schreibtisch immer hoch und runter gestellt werden. Im Büro haben wir solche Tische und bei Google findest Du auch Bezugsmöglichkeiten um nur das Gestell zu beziehen. Wenn Du mehr als einen haben möchtest, dann machte es Dir jeder Elo-Meister, das es nur mit einer Fernbedienung geht. Bei uns hat es eine Firma damals gemacht und ich habe beide Schreibtisch die GLEICHZEITIG hoch oder runter gehen. Nur das ich noch die reine Tischplatte noch kippen kann, so das die Platte hinten höher ist als vorne. Die Monitore stehen ja nicht auf der Kippplatte, sondern sind auf den hinteren 18 cm, die nicht kippen. Oder schreibe die Hersteller von den Tischen an und frag nach, ob Du nur das Gerüst bekommen könntest. Ich versuche das gerade bei einer Firma, die sitzt in Schweden und nennt sich NICHT Ieak.
dk_gesehen.jpg dk_gesehen2.jpg -
Ich shcließe mich dem Oscar an.
-
Hallo Oscar.
MAl eine FRage. Wieso geht es dann bei mir in den Scripten wo ich mit Barcodescanner einlese, das er den Code liest und dann sofort weiter macht?
Naja, wenn ihm die Lsg. von Dir reicht dann sind wir alle wieder glücklicher und ich habe etwas, das ich aufbewahren kann und ggf. nutze. -
@shakoon
Du mußte das Input ja nicht anzeigen lassen, aber ohne dem kenne ich keine Lsg. -
Also pack das Bild "picture.jpg" mit in den Script Ordner und teste es. Ansonsten weiß ich auch nicht weiter. Bekommst Du eine Fehlermeldung?
Ich habe gerade noch einen kleinen Fehler im Script beseitigt. -
Ja, kannst Du. In dem Dokument im Anhang, es nennt sich Handbuch, wird es so ab Seite 128 wichtig. Wenn ich das richtig gelesen habe, dann sind das 3 Scanns.
-
Dann frag die zahl doch ab und häng "undEnter" hinten dran und arbeite dann damit weiter.
Und wenn er $Zahl & "undEnter", das Problem ist, und Du nur die "10" brauchst, dannAutoIt
Alles anzeigen; Eingabelänge ermitteln $Eingabe_und_Enter = "100undEnter" ; 10 Local $len = StringLen($Eingabe_und_Enter) If $Eingabe_und_Enter = 10 then _zehn() If $Eingabe_und_Enter > 10 Then _elf() Func _zehn() $result = StringLeft($Eingabe_und_Enter,2) MsgBox(0,"","Die ersten beiden Stellen von li. sind: " & $result) EndFunc Func _elf() $result = StringLeft($Eingabe_und_Enter,3) MsgBox(0,"","Die ersten drei Stellen von li. sind: " & $result) EndFunc
wenn ich Dich nun richtig verstanden habe.
-
Ach so, dann versuche es mal so wie im Script. Habe dort vermerkt was ich gemacht habe.
AutoIt
Alles anzeigen#include <MsgBoxConstants.au3> #include <String.au3> Sendpicture() ; hier eingefügt Func Sendpicture() $sFilePath = @ScriptDir & "/picture.jpg" ; hier geändert Local $sFile = FileOpen($sFilePath, 16) If $sFile = -1 Then MsgBox($MB_SYSTEMMODAL, "", "An error occurred when reading the file.") EndIf Local $sFileRead = FileRead($sFile) $Hex = $sFileRead ; <--- hier neu $String = _HexToString($Hex) ; <--- hier neu FileClose($sFile) ;debug info If FileExists("output.jpg") Then FileDelete("output.jpg") ; hier geändert $file = FileOpen("output.jpg", 1) ; hier geändert FileWrite($file, $sFileRead) FileClose($file) $sBoundary = "------WebKitFormBoundary"&Chr(Random(Asc("A"), Asc("Z"), 3))&Chr(Random(Asc("a"), Asc("z"), 3))&Chr(Random(Asc("A"), Asc("Z"), 3))&Chr(Random(Asc("a"), Asc("z"), 3))&Random(1, 9, 1)&Random(1, 9, 1)&Random(1, 9, 1) Local $sPD $sPD = $sBoundary & @CRLF & _ 'Content-Disposition: form-data; name="photo"; filename="Test.jpg"' & @CRLF & _ 'Content-Type: image/jpeg' & @CRLF & @CRLF & _ $sFileRead $oHTTP = ObjCreate("winhttp.winhttprequest.5.1") $oHTTP.Open("POST", "http://requestb.in/19g7yg56456", False) $oHTTP.setRequestHeader("User-Agent", "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36") $oHTTP.SetRequestHeader("Content-Type", 'multipart/form-data; boundary="' & $sBoundary & '"') $oHTTP.SetRequestHeader("Accept-Encoding", 'gzip, deflate') $oHTTP.setRequestHeader("Content-Length", StringLen($sPD)) $oHTTP.Send ($sPD) $oHeaderResponses = $oHTTP.GetAllResponseHeaders() $oReceived = $oHTTP.ResponseText $oStatusCode = $oHTTP.Status ConsoleWrite($oStatusCode & @CRLF) ConsoleWrite($oReceived) ConsoleWrite($oHeaderResponses) EndFunc
-
Ich meine das SAP das zur Verfügung stellt.
Ich kenne andere Firmen, da läuft SAP und die scannen auch Barcodes ein und dann öffnet sich ein Vorgang.
Kannst dort bei SAP doch einfach mal unverbindlich anrufen unter (+49) 8005343424. -
Das ist okay.
Bin da dann auch sicherlich im Büro und kann sonst mal schauen wie da das Script genau ausschaut.