Jump to content

AUTOLAB

Members
  • Posts

    16
  • Joined

  • Last visited

Everything posted by AUTOLAB

  1. Nice! _Excel_Open(False) worked well for the Excel File.
  2. Ok I`ll try. Thank You water!
  3. Hello AutoIt community, I would like to be able to use this script to create a user account to which only certain people (in an Excel list) have access. How can Excel as well as the array be hidden from the user? I know "GUICtrlSetState(-1,$GUI_HIDE)" doesn`t work ... My Skript: #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <String.au3> #include <Excel.au3> #Region ### START Koda GUI section ### Form= Global $Form_Benutzeraccount = GUICreate("Benutzeraccount", 300, 100, 600, 200) $Label_Willkommen = GUICtrlCreateLabel("Herzlich Willkommen!", 30, 10, 112, 20) $Button_Registrieren = GUICtrlCreateButton("Registrieren", 30, 60, 107, 25) GUICtrlSetBkColor(-1, 0x99B4D1) $Button_Login = GUICtrlCreateButton("Login", 160, 60, 99, 25) GUICtrlSetBkColor(-1, 0x99B4D1) $Label1 = GUICtrlCreateLabel("Neu hier:", 30, 40, 112, 20) $Label2 = GUICtrlCreateLabel("Bereits registriert:", 160, 40, 170, 20) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button_Login _Login() Case $Button_Registrieren _Registrieren() EndSwitch WEnd Func _Registrieren() Global $Form_Reg = GUICreate("Registrieren", 300, 100, 600, 200) GUISetBkColor(0x99B4D1) $Label1 = GUICtrlCreateLabel("Username:", 30, 8, 55, 20) $Label2 = GUICtrlCreateLabel("Passwort:", 30, 32, 67, 20) $Input1 = GUICtrlCreateInput("", 114, 8, 121, 21) $Input2 = GUICtrlCreateInput("", 114, 32, 121, 21) $Button1 = GUICtrlCreateButton("Registrieren", 113, 56, 121, 25) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE GUIDelete($Form_Reg) ExitLoop Case $Button1 Local $var = "C:\Users\Admin\Desktop\Benutzeraccount\Berechtigte_Benutzer.xlsx" Local $Eingabe = GUICtrlRead($Input1) Local $Excel_open = _Excel_Open() Local $Workbook_open = _Excel_BookOpen($Excel_open, $var) Local $read_B = _Excel_RangeFind($Workbook_open, $Eingabe) If @error Then Exit MsgBox($MB_SYSTEMMODAL, "Excel UDF: Berechtigte_Benutzer", "Error." & @CRLF & "@error = " & @error & ", @extended = " & @extended) _ArrayDisplay($read_B, "Excel UDF: Berechtigte_Benutzer", "", 0, "|", "Sheet|Name|Cell|Value|Formula|Comment") GUICtrlSetState(-1,$GUI_HIDE);FEHLER: Befehl wird nicht ausgeführt. $searchArray = _ArraySearch($read_B, $Eingabe, 0, 0, 0, 0, 1, -1, True); Resultat 3 = True und -1 = False GUICtrlSetState(-1,$GUI_HIDE);FEHLER: Befehl wird nicht ausgeführt. If $searchArray = "-1" Then MsgBox(0,"Array-Inhalt","Sie haben leider keine Zulassung zu einem Benutzerkonto.") EndIf If $searchArray = "3" Then Local $Benutzeraccount = "\Benutzeraccount\" $username_neu = GUICtrlRead($Input1) $passwort_neu = GUICtrlRead($Input2) If FileExists("C:\Users\Admin\Desktop\Benutzeraccount\" & $username_neu & "\" & "Name_" & $username_neu & ".txt") Then MsgBox(16, "Fehler!", "Account existiert schon!" & @CRLF & @CRLF & "Wenn sie ihr Passwort vergessen haben," & @CRLF & "müssen sie sich einen neuen Account" & @CRLF & "mit anderen Zugangsdaten zulegen.") _Registrieren() EndIf DirCreate("C:\Users\Admin\Desktop\Benutzeraccount\" & $username_neu) FileWrite("C:\Users\Admin\Desktop\Benutzeraccount\" & $username_neu & "\" & "Name_" & $username_neu & ".txt", $username_neu & @CRLF) FileWrite("C:\Users\Admin\Desktop\Benutzeraccount\" & $username_neu & "\" & "Passwort_" & $passwort_neu & ".txt", $passwort_neu & @CRLF) MsgBox(0, "Erfolgreich!", "Sie haben sich erfolgreich Registriert," & @CRLF & "loggen sie sich jetzt bitte ein.") GUIDelete($Form_Reg) _Login() EndIf EndSwitch WEnd EndFunc
  4. Okay @Zedna but why does it still works for the function _Bereich_1 then ... I will try "GUICtrlSetImage() 😃
  5. #Include <GUIConstants.au3> #include <ColorConstants.au3> #include <MsgBoxConstants.au3> #include <GDIPlus.au3> Opt("GUIOnEventMode", 1) _gui_settings() Func _gui_settings() $Settings = GUICreate("Settings", 615, 438, 192, 124) $mFRET = GUICtrlCreateMenu("&FRET") $mEndpoint_FRET = GUICtrlCreateMenuItem("&Endpoint", $mFRET) Local Static $FRET_Static = GUICtrlSetOnEvent(-1, "_tab_FRET") $Button_Cancel = GUICtrlCreateButton("Cancel", 450, 370, 70, 20) GUICtrlSetOnEvent(-1, "_ende") $Button_OK = GUICtrlCreateButton("OK", 530, 370, 70, 20) GUICtrlSetOnEvent(-1, "_ende") GUISetOnEvent($GUI_EVENT_CLOSE, "_ende") GUISetState(@SW_SHOW) While 1 Sleep(10) WEnd GUISetState(@SW_HIDE) EndFunc Func _ende() Exit EndFunc _tab_FRET() Func _tab_FRET() Local Static $idTab = GUICtrlCreateTab(0, 10, 620, 355) Local Static $ReadArea = GUICtrlCreateTabItem("Read Area") $Checkbox_allWells = GUICtrlCreateCheckbox("Select All", 545, 45, 97, 17) GUICtrlSetOnEvent(-1,"_Bereich_alle") $Pic_Wellplate = GUICtrlCreatePic("C:\Users\Admin\Pictures\Wellplatepic.jpg", 70, 60, 467, 300) $Button_1 = GUICtrlCreateButton ("1", 125, 45, 40, 20) GUICtrlSetOnEvent(-1,"_Bereich_1") $Button_2 = GUICtrlCreateButton ("2", 175, 45, 40, 20) GUICtrlSetOnEvent (-1,"_Bereich_2") $Button_3 = GUICtrlCreateButton ("3", 225, 45, 40, 20) GUICtrlSetOnEvent(-1,"_Bereich_3") $Button_4 = GUICtrlCreateButton ("4", 275, 45, 40, 20) $Button_5 = GUICtrlCreateButton ("5", 325, 45, 40, 20) $Button_6 = GUICtrlCreateButton ("6", 375, 45, 40, 20) $Button_7 = GUICtrlCreateButton ("7", 425, 45, 40, 20) $Button_8 = GUICtrlCreateButton ("8", 475, 45, 40, 20) Local Static $MoreSettings = GUICtrlCreateTabItem("More Settings") Local Static $mEnd = GUICtrlCreateTabItem("") GUISetState(@SW_SHOW) EndFunc Func _Bereich_alle() ; No Pics shown $Checkbox_allWells = GUICtrlCreateCheckbox("Select All", 545, 45, 97, 17) GUICtrlSetState(-1,$GUI_HIDE) If $Checkbox_allWells And BitAND(GUICtrlRead($Checkbox_allWells), $GUI_CHECKED) = $GUI_CHECKED Then $Pic_Spalte1 = GUICtrlCreatePic("C:\Users\Admin\Pictures\Wellplate_Spalte.jpg", 120, 98, 49, 253) GUICtrlSetState(-1,$GUI_SHOW) Local $Pic_Spalte2 = GUICtrlCreatePic("C:\Users\Admin\Pictures\Wellplate_Spalte.jpg", 170, 98, 49, 253) GUICtrlSetState(-1,$GUI_SHOW) Local $Pic_Spalte3 = GUICtrlCreatePic("C:\Users\Admin\Pictures\Wellplate_Spalte.jpg", 220, 98, 49, 253) GUICtrlSetState(-1,$GUI_SHOW) Local $Pic_Spalte4 = GUICtrlCreatePic("C:\Users\Admin\Pictures\Wellplate_Spalte.jpg", 270, 98, 49, 253) GUICtrlSetState(-1,$GUI_SHOW) Local $Pic_Spalte5 = GUICtrlCreatePic("C:\Users\Admin\Pictures\Wellplate_Spalte.jpg", 320, 98, 49, 253) GUICtrlSetState(-1,$GUI_SHOW) Local $Pic_Spalte6 = GUICtrlCreatePic("C:\Users\Admin\Pictures\Wellplate_Spalte.jpg", 370, 98, 49, 253) GUICtrlSetState(-1,$GUI_SHOW) Local $Pic_Spalte7 = GUICtrlCreatePic("C:\Users\Admin\Pictures\Wellplate_Spalte.jpg", 420, 98, 49, 253) GUICtrlSetState(-1,$GUI_SHOW) Local $Pic_Spalte8 = GUICtrlCreatePic("C:\Users\Admin\Pictures\Wellplate_Spalte.jpg", 470, 98, 49, 253) GUICtrlSetState(-1,$GUI_SHOW) EndIf EndFunc Func _Bereich_1() $Button_1 = GUICtrlCreateButton ("1", 125, 45, 40, 20) GUICtrlSetState(-1, $GUI_HIDE) If $Button_1 And BitAND(GUICtrlRead($Button_1), $GUI_CHECKED) = $GUI_CHECKED Then Local $Pic_Spalte1 = GUICtrlCreatePic("C:\Users\Admin\Pictures\Wellplate_Spalte.jpg", 120, 98, 49, 253) GUICtrlSetState($Pic_Spalte1,$GUI_ENABLE) EndIf EndFunc Func _Bereich_2() $Button_2 = GUICtrlCreateButton ("2", 175, 45, 40, 20) GUICtrlSetState(-1, $GUI_HIDE) If $Button_2 And BitAND(GUICtrlRead($Button_2), $GUI_CHECKED) = $GUI_CHECKED Then Local $Pic_Spalte2 = GUICtrlCreatePic("C:\Users\Admin\Pictures\Wellplate_Spalte.jpg", 170, 98, 49, 253) GUICtrlSetState($Pic_Spalte2,$GUI_ENABLE) EndIf EndFunc Func _Bereich_3() $Button_3 = GUICtrlCreateButton ("3", 225, 45, 40, 20) GUICtrlSetState(-1, $GUI_HIDE) If $Button_3 And BitAND(GUICtrlRead($Button_3), $GUI_CHECKED) = $GUI_CHECKED Then Local $Pic_Spalte3 = GUICtrlCreatePic("C:\Users\Admin\Pictures\Wellplate_Spalte.jpg", 220, 98, 49, 253) GUICtrlSetState($Pic_Spalte3,$GUI_ENABLE) EndIf EndFunc Hello it`s me again 🙃 Since hours I try to solve the problem without success... I need your help. Why is it not possible to insert the picture of the "Bereich_alle" and "_Bereich_2" function and why do the pictures ( $Pic_Spalte1) also appear on the "More Settings" tab?
  6. #Include <GUIConstants.au3> #include <ColorConstants.au3> #include <MsgBoxConstants.au3> #include <GDIPlus.au3> Opt("GUIOnEventMode", 1) ;Aufrufen der Funktionen gui_settings() Func gui_settings() $Settings = GUICreate("Settings", 615, 438, 192, 124) $mFile = GUICtrlCreateMenu("&File") $mOpen = GUICtrlCreateMenuItem("&Open", $mFile) GUICtrlSetOnEvent(-1, "open") $mSaveas = GUICtrlCreateMenuItem("&Save", $mFile, 1) GUICtrlSetOnEvent(-1,"save") GUICtrlSetState(-2, $GUI_DEFBUTTON) GUICtrlCreateMenuItem("", $mFile, 4) $mExit = GUICtrlCreateMenuItem("&Exit", $mFile) GUICtrlSetOnEvent(-1, "ende") $mABS = GUICtrlCreateMenu("&ABS") $mEndpoint_ABS = GUICtrlCreateMenuItem("&Endpoint", $mABS) ;~ GUICtrlSetOnEvent(-1, "tab_ABS") $mKinetic_ABS = GUICtrlCreateMenu("&Kinetic", $mABS) $mWellScan_ABS = GUICtrlCreateMenu("&Well Scan", $mABS) $mSpectrum_ABS = GUICtrlCreateMenu("&Spectrum", $mABS) $mFRET = GUICtrlCreateMenu("&FRET") $mEndpoint_FRET = GUICtrlCreateMenuItem("&Endpoint", $mFRET) ;~ GUICtrlSetOnEvent(-1, "tab_FRET") $mKinetic_FRET = GUICtrlCreateMenu("&Kinetic", $mFRET) $mWellScan_FRET = GUICtrlCreateMenu("&Well Scan", $mFRET) $mLUM = GUICtrlCreateMenu("&LUM") $mEndpoint_LUM = GUICtrlCreateMenuItem("&Endpoint", $mLUM) GUICtrlSetOnEvent(-1, "tab_LUM") $mKinetic_LUM = GUICtrlCreateMenu("&Kinetic", $mLUM) $mWellScan_LUM = GUICtrlCreateMenu("&Well Scan", $mLUM) $mSpectrum_LUM = GUICtrlCreateMenu("&Spectrum", $mLUM) $mFragezeichen = GUICtrlCreateMenu("&?") $mHelp_Fragezeichen = GUICtrlCreateMenuItem("Help" & @TAB & "F1", $mFragezeichen) GUICtrlSetOnEvent(-1, "help") $Button_Cancel = GUICtrlCreateButton("Cancel", 450, 370, 70, 20) GUICtrlSetOnEvent(-1, "ende") $Button_OK = GUICtrlCreateButton("OK", 530, 370, 70, 20) GUICtrlSetOnEvent(-1, "ende") GUISetOnEvent($GUI_EVENT_CLOSE, "ende") GUISetState(@SW_SHOW) While 1 Sleep(10) WEnd GUISetState(@SW_HIDE) EndFunc Func ende() Exit EndFunc Func help() MsgBox(289, "Help", "Just ask Annika.") EndFunc Func open() FileOpenDialog(" Open some File...", @WindowsDir, "All(*.*)") EndFunc Func save() Local $sFileSaveDialog = FileSaveDialog("Save as", "::{450D8FBA-AD25-11D0-98A8-0800361B1103}", "Scripts (*.au3)", $FD_PATHMUSTEXIST) If @error Then MsgBox($MB_SYSTEMMODAL, "", "No file was saved.") Else MsgBox($MB_SYSTEMMODAL, "", "You saved the following file:" & @CRLF & $sFileSaveDialog) EndIf EndFunc Func tab_LUM() ; FEHLER: Es lässt unendlich viele Tabs erstellen Local Static $idTab = GUICtrlCreateTab(0, 10, 620, 355) Local Static $wave = GUICtrlCreateTabItem("Wavelengths") Local Static $Label_NumberW = GUICtrlCreateLabel("Number of Wavelenghts:", 10, 40, 170, 20) Local Static $Input_Wavelenghts = GUICtrlCreateInput("", 150, 37, 70, 20) GUICtrlCreateUpdown($Input_Wavelenghts) Local Static $Label_Lm1 = GUICtrlCreateLabel("Lm1", 120, 70, 20, 20) Local Static $Input_Lm1 = GUICtrlCreateInput("", 150, 67, 70, 20) Local Static $Label_nm = GUICtrlCreateLabel("nm", 230, 70, 70, 20) Local Static $Pic_Spektrum = GUICtrlCreatePic("C:\Users\Admin\Pictures\Spektrum.jpg", 10, 100, 500, 150) Local Static $Button_700nm = GUICtrlCreateButton ("700 nm", 35, 210, 50, 20) GUICtrlSetBkColor(-1, 0xFF0000) Local Static $Button_650nm = GUICtrlCreateButton ("650 nm", 100, 210, 50, 20) GUICtrlSetBkColor(-1, 0xFFA500 ) Local Static $Button_600nm = GUICtrlCreateButton ("600 nm", 165, 210, 50, 20) GUICtrlSetBkColor(-1, 0xFFFF00) Local Static $Button_550nm = GUICtrlCreateButton ("550 nm", 230, 210, 50, 20) GUICtrlSetBkColor(-1, 0x008000) Local Static $Button_500nm = GUICtrlCreateButton ("500 nm", 295, 210, 50, 20) GUICtrlSetBkColor(-1, 0x0000FF) Local Static $Button_450nm = GUICtrlCreateButton ("450 nm", 360, 210, 50, 20) GUICtrlSetBkColor(-1, 0x191970) GUICtrlSetColor(-2, 0xFFFFFF) Local Static $Button_400nm = GUICtrlCreateButton ("400 nm", 430, 210, 50, 20) GUICtrlSetBkColor(-1, 0xEE82EE) GUISetState(@SW_SHOW) Local Static $PlateType = GUICtrlCreateTabItem("Plate Type") Local Static $Label_NumberP = GUICtrlCreateLabel("Number of Plates:", 10, 40, 109, 20) Local Static $Input_NumberP = GUICtrlCreateInput("", 120, 37, 70, 20) GUICtrlCreateUpdown($Input_NumberP) Local Static $Group_Plate_Bottom = GUICtrlCreateGroup("", 5, 55, 230, 130) Local Static $Label_Plate_Bottom = GUICtrlCreateLabel ("Choose Platebottom:", 10, 70, 109, 20) Local Static $Radio_PlateAuswahl_U = GUICtrlCreateRadio ("96-U", 120, 70, 50, 20) Local Static $Radio_PlateAuswahl_V = GUICtrlCreateRadio ("96-V", 120, 100, 50, 20) Local Static $Radio_PlateAuswahl_F = GUICtrlCreateRadio ("96-F", 120, 130, 50, 20) Local Static $Radio_PlateAuswahl_C = GUICtrlCreateRadio ("96-C", 120, 160, 50, 20) Local Static $Group_Plate_Bottom = GUICtrlCreateGroup("", 5, 175, 230, 130) Local Static $Label_PlateMaterial = GUICtrlCreateLabel ("Plate material:", 10, 190, 109, 20) Local Static $Radio_highbinding = GUICtrlCreateRadio("high-binding", 120, 190, 100, 20) Local Static $Radio_normalbinding = GUICtrlCreateRadio("normal-binding", 120, 220, 100, 20) Local Static $Radio_notbinding = GUICtrlCreateRadio("not-binding", 120, 250, 100, 20) Local Static $ReadArea = GUICtrlCreateTabItem("Read Area") Local Static $Checkbox_allWells = GUICtrlCreateCheckbox("Select All", 545, 45, 97, 17) Local Static $Pic_Wellplate = GUICtrlCreatePic("C:\Users\Admin\Pictures\Wellplatepic.jpg", 70, 60, 467, 300) Local Static $Button_A = GUICtrlCreateButton ("A->", 35, 110, 40, 20) ;~ GUICtrlSetOnEvent(-1,"Bereich_A") Local Static $Button_B = GUICtrlCreateButton ("B->", 35, 155, 40, 20) ;~ GUICtrlSetOnEvent(-1,"Bereich_B") Local Static $Button_C = GUICtrlCreateButton ("C->", 35, 200, 40, 20) Local Static $Button_D = GUICtrlCreateButton ("D->", 35, 245, 40, 20) Local Static $Button_E = GUICtrlCreateButton ("E->", 35, 290, 40, 20) Local Static $Button_F = GUICtrlCreateButton ("F->", 35, 335, 40, 20) Local Static $Button_1 = GUICtrlCreateButton ("1", 125, 45, 40, 20) ;~ GUICtrlSetOnEvent(-1,"Bereich_1") Local Static $Button_2 = GUICtrlCreateButton ("2", 175, 45, 40, 20) ;~ GUICtrlSetOnEvent(-1,"Bereich_2") Local Static $Button_3 = GUICtrlCreateButton ("3", 225, 45, 40, 20) ;~ GUICtrlSetOnEvent(-1,"Bereich_3") Local Static $Button_4 = GUICtrlCreateButton ("4", 275, 45, 40, 20) ;~ GUICtrlSetOnEvent(-1,"Bereich_4") Local Static $Button_5 = GUICtrlCreateButton ("5", 325, 45, 40, 20) ;~ GUICtrlSetOnEvent(-1,"Bereich_5") Local Static $Button_6 = GUICtrlCreateButton ("6", 375, 45, 40, 20) ;~ GUICtrlSetOnEvent(-1,"Bereich_6") Local Static $Button_7 = GUICtrlCreateButton ("7", 425, 45, 40, 20) ;~ GUICtrlSetOnEvent(-1,"Bereich_7") Local Static $Button_8 = GUICtrlCreateButton ("8", 475, 45, 40, 20) ;~ GUICtrlSetOnEvent(-1,"Bereich_8") Local Static $PTMandOptics = GUICtrlCreateTabItem("PTM and Optics") Local Static $Shake = GUICtrlCreateTabItem("Shake") Local Static $Label_Shake_Question = GUICtrlCreateLabel("Should the plate be shaken?", 10, 40, 145, 20) global $Radio_Shake_Yes = GUICtrlCreateRadio("Yes", 170, 37, 70, 20) ;~ GUICtrlSetOnEvent(-1, "radio_Yes") global $Radio_Shake_No = GUICtrlCreateRadio("No", 250, 37, 70, 20) ;~ GUICtrlSetOnEvent(-1, "radio_No") GUICtrlSetState($Radio_Shake_Yes, $GUI_CHECKED) Local Static $Label_Shakespeed = GUICtrlCreateLabel("Shaking speed:", 10, 70, 100, 20) Global $Input_Shakespeed = GUICtrlCreateInput("", 100, 65, 70, 20) Local Static $MoreSettings = GUICtrlCreateTabItem("More Settings") GUICtrlCreateTabItem("") EndFunc My script
  7. Yes @jchd i read this commend That it should only be visible once works wonderfully, but I don't want the tabs to disappear again after milliseconds and my entire program to abort ...
  8. Now the tab only appears for a few milliseconds ...
  9. Ok I will try ☺️
  10. Sorry guys, I'm still a beginner and don't know how to implement the suggestions. "Static" did not work, but I was able to call the function several times and again had the problem of creating an infinite number of tabs.
  11. #Include <GUIConstants.au3> #include <ColorConstants.au3> #include <MsgBoxConstants.au3> #include <Sound.au3> $mEndpoint_ABS = GUICtrlCreateMenuItem("&Endpoint", $mABS) GUICtrlSetOnEvent(-1, "tab_ABS") Func tab_ABS() Opt("GUIOnEventMode", 1) Local $idTab = GUICtrlCreateTab(0, 10, 620, 355) GUICtrlCreateTabItem("Plate Type") GUICtrlCreateTabItem("Shake") GUICtrlCreateTabItem("More Settings") GUICtrlCreateTabItem("") EndFunc How can I have the function executed only once so that I do not have to create a large number of different tabs every time I click on "Endpoint"? ( It's just an excerpt from the script)
  12. Thank you Zedna and Nine !
  13. Hey Jos, can you explain your comment in more detail?
  14. Hey I would like to open the tabs only when you click on the sub-item "Endpoint" and this tab should appear once for the menu items ABS, FRET and LUM. Can someone help me? #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <ButtonConstants.au3> #include <EditConstants.au3> #include <MsgBoxConstants.au3> #Region ### START Koda GUI section ### Form= $Settings = GUICreate("Settings", 615, 438, 192, 124) $mFile = GUICtrlCreateMenu("&File") $mNew = GUICtrlCreateMenuItem("&New", $mFile) GUICtrlSetState(-1, $GUI_DEFBUTTON) $mOpen = GUICtrlCreateMenuItem("&Open", $mFile) $mSave = GUICtrlCreateMenuItem("&Save", $mFile) $mSaveas = GUICtrlCreateMenuItem("&Save as", $mFile, 1) GUICtrlCreateMenuItem("", $mFile, 4) $mExit = GUICtrlCreateMenuItem("&Exit", $mFile) $mABS = GUICtrlCreateMenu("&ABS") $mEndpoint_ABS = GUICtrlCreateMenuItem("&Endpoint", $mABS) $mKinetic_ABS = GUICtrlCreateMenu("&Kinetic", $mABS) $mWellScan_ABS = GUICtrlCreateMenu("&Well Scan", $mABS) $mSpectrum_ABS = GUICtrlCreateMenu("&Spectrum", $mABS) $mFRET = GUICtrlCreateMenu("&FRET") $mEndpoint_FRET = GUICtrlCreateMenuItem("&Endpoint", $mFRET) $mKinetic_FRET = GUICtrlCreateMenu("&Kinetic", $mFRET) $mWellScan_FRET = GUICtrlCreateMenu("&Well Scan", $mFRET) $mLUM = GUICtrlCreateMenu("&LUM") $mEndpoint_LUM = GUICtrlCreateMenuItem("&Endpoint", $mLUM) $mKinetic_LUM = GUICtrlCreateMenu("&Kinetic", $mLUM) $mWellScan_LUM = GUICtrlCreateMenu("&Well Scan", $mLUM) $mSpectrum_LUM = GUICtrlCreateMenu("&Spectrum", $mLUM) $mFragezeichen = GUICtrlCreateMenu("&?") $mHelp_Fragezeichen = GUICtrlCreateMenuItem("Help" & @TAB & "F1", $mFragezeichen) $Button_Cancel = GUICtrlCreateButton("Cancel", 450, 370, 70, 20) $Button_OK = GUICtrlCreateButton("OK", 530, 370, 70, 20) GUICtrlSetState(-1, $GUI_FOCUS) Local $idTab = GUICtrlCreateTab(0, 10, 620, 355)                 $wave = GUICtrlCreateTabItem("Wavelengths")                 $Label_NumberW = GUICtrlCreateLabel("Number of Wavelenghts:", 10, 40, 170, 20)                 $Input_Wavelenghts = GUICtrlCreateInput("", 150, 37, 70, 20)                 GUICtrlCreateUpdown($Input_Wavelenghts)                 $Label_Lm1 = GUICtrlCreateLabel("Lm1", 120, 70, 20, 20)                 $Input_Lm1 = GUICtrlCreateInput("", 150, 67, 70, 20)                 $Label_nm = GUICtrlCreateLabel("nm", 230, 70, 70, 20)                 Local $Pic_Spektrum = GUICtrlCreatePic("C:\Users\Admin\Pictures\Spektrum.jpg", 10, 100, 500, 150)                 $Button_700nm = GUICtrlCreateButton ("700 nm", 35, 210, 50, 20)                 GUICtrlSetBkColor(-1, 0xFF0000)                 $Button_650nm = GUICtrlCreateButton ("650 nm", 100, 210, 50, 20)                 GUICtrlSetBkColor(-1, 0xFFA500 )                 $Button_600nm = GUICtrlCreateButton ("600 nm", 165, 210, 50, 20)                 GUICtrlSetBkColor(-1, 0xFFFF00)                 $Button_550nm = GUICtrlCreateButton ("550 nm", 230, 210, 50, 20)                 GUICtrlSetBkColor(-1, 0x008000)                 $Button_500nm = GUICtrlCreateButton ("500 nm", 295, 210, 50, 20)                 GUICtrlSetBkColor(-1, 0x0000FF)                 $Button_450nm = GUICtrlCreateButton ("450 nm", 360, 210, 50, 20)                 GUICtrlSetBkColor(-1, 0x191970)                 GUICtrlSetColor(-2, 0xFFFFFF)                 $Button_400nm = GUICtrlCreateButton ("400 nm", 430, 210, 50, 20)                 GUICtrlSetBkColor(-1, 0xEE82EE)                 GUISetState(@SW_SHOW)                 GUICtrlCreateTabItem("Plate Type")                 $Label_NumberP = GUICtrlCreateLabel("Number of Plates:", 10, 40, 109, 20)                 $Input_NumberP = GUICtrlCreateInput("", 120, 37, 70, 20)                 GUICtrlCreateUpdown($Input_NumberP)                 $Group_Plate_Bottom = GUICtrlCreateGroup("", 5, 55, 230, 130)                 $Label_Plate_Bottom = GUICtrlCreateLabel ("Choose Platebottom:", 10, 70, 109, 20)                 $Radio_PlateAuswahl_U = GUICtrlCreateRadio ("96-U", 120, 70, 50, 20)                 $Radio_PlateAuswahl_V = GUICtrlCreateRadio ("96-V", 120, 100, 50, 20)                 $Radio_PlateAuswahl_F = GUICtrlCreateRadio ("96-F", 120, 130, 50, 20)                 $Radio_PlateAuswahl_C = GUICtrlCreateRadio ("96-C", 120, 160, 50, 20)                 $Group_Plate_Bottom = GUICtrlCreateGroup("", 5, 175, 230, 130)                 $Label_PlateMaterial = GUICtrlCreateLabel ("Plate material:", 10, 190, 109, 20)                 $Radio_highbinding = GUICtrlCreateRadio("high-binding", 120, 190, 100, 20)                 $Radio_normalbinding = GUICtrlCreateRadio("normal-binding", 120, 220, 100, 20)                 $Radio_notbinding = GUICtrlCreateRadio("not-binding", 120, 250, 100, 20)                 GUICtrlCreateTabItem("Read Area")                 $Checkbox_allWells = GUICtrlCreateCheckbox("Select All", 545, 45, 97, 17)                 Local $Pic_Wellplate = GUICtrlCreatePic("C:\Users\Admin\Pictures\Wellplatepic.jpg", 70, 60, 467, 300)                 $Button_A = GUICtrlCreateButton ("A->", 35, 110, 40, 20) ; AUSSTEHEND: einzelne Wells/Reihen/Spalten/Alles markieren                 $Button_B = GUICtrlCreateButton ("B->", 35, 155, 40, 20)                 $Button_C = GUICtrlCreateButton ("C->", 35, 200, 40, 20)                 $Button_D = GUICtrlCreateButton ("D->", 35, 245, 40, 20)                 $Button_E = GUICtrlCreateButton ("E->", 35, 290, 40, 20)                 $Button_F = GUICtrlCreateButton ("F->", 35, 335, 40, 20)                 $Button_1 = GUICtrlCreateButton ("1", 125, 45, 40, 20)                 $Button_2 = GUICtrlCreateButton ("2", 175, 45, 40, 20)                 $Button_3 = GUICtrlCreateButton ("3", 225, 45, 40, 20)                 $Button_4 = GUICtrlCreateButton ("4", 275, 45, 40, 20)                 $Button_5 = GUICtrlCreateButton ("5", 325, 45, 40, 20)                 $Button_6 = GUICtrlCreateButton ("6", 375, 45, 40, 20)                 $Button_7 = GUICtrlCreateButton ("7", 425, 45, 40, 20)                 $Button_8 = GUICtrlCreateButton ("8", 475, 45, 40, 20)                 GUICtrlCreateTabItem("PTM and Optics")                 GUICtrlCreateTabItem("Shake")                 $Label_Shake_Question = GUICtrlCreateLabel("Should the plate be shaken?", 10, 40, 145, 20)                 Local $Radio_Shake_Yes = GUICtrlCreateRadio("Yes", 170, 37, 70, 20)                 Local $Radio_Shake_No = GUICtrlCreateRadio("No", 250, 37, 70, 20)                 GUICtrlSetState($Radio_Shake_Yes, $GUI_CHECKED)                 $Label_Shakespeed = GUICtrlCreateLabel("Shaking speed:", 10, 70, 100, 20)                 $Input_Shakespeed = GUICtrlCreateInput("", 100, 65, 70, 20)                 GUICtrlCreateTabItem("More Settings")                 GUICtrlCreateTabItem("") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ###  While 1          global $nMsg = GUIGetMsg()          Select              Case $nMsg = $GUI_EVENT_CLOSE                     Exit              Case $nMsg = $Button_Cancel                  Exit              Case $nMsg = $mExit                  Exit             Case $nMsg = $mOpen             FileOpenDialog(" Open some File...", @WindowsDir, "All(*.*)")             Case $nMsg =  $Radio_Shake_No And BitAND(GUICtrlRead($Radio_Shake_No), $GUI_CHECKED) = $GUI_CHECKED                 GUICtrlSetState($Input_Shakespeed,$GUI_Disable)             Case $nMsg = $Radio_Shake_Yes And BitAND(GUICtrlRead($Radio_Shake_Yes), $GUI_CHECKED) = $GUI_CHECKED                 GUICtrlSetState($Input_Shakespeed,$GUI_enable)             Case $nMsg =  $mHelp_Fragezeichen             Local $iMsgBoxAnswer             $iMsgBoxAnswer = MsgBox(289, "Help", "Just ask Annika.")          EndSelect     WEnd
  15. Thank You Zedna!!!
  16. Hi Leute 🥳, Ich gestallte gerade ein Menü und komme bei einem Problem nicht weiter: Ich möchte auf der Oberfläche bei unterschiedlicher Auswahl an Ordnern auch unterschiedliche Felder/Checkboxen/Bilder anzeigen lassen, jedoch überlagern sich diese und summieren sich auf, anstatt bei neuer Ordnerwahl wegzugehen. 🤯 Kann mir da jemand weiterhelfen? 😇 Translation by Google: Hi guys 🥳, I am currently designing a menu and get stuck with a problem: I would like to display different fields / checkboxes / images on the surface with different selection of folders, but these overlap and add up instead of going away when selecting a new folder. 🤯 Can someone help me there? 😇 #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Settings = GUICreate("Settings",615,438,192,124) $mFile = GUICtrlCreateMenu ("&File")     $mNew = GUICtrlCreateMenuItem("&New",$mFile)     GUICtrlSetState(-1,$GUI_DEFBUTTON)     $mOpen = GUICtrlCreateMenuItem("&Open",$mFile)     $mSave = GUICtrlCreateMenuItem("&Save",$mFile)     $mSaveas = GUICtrlCreateMenu("&Save as",$mFile,1)     GUICtrlCreateMenuItem("",$mFile,4)     $mExit = GUICtrlCreateMenuItem("&Exit",$mFile) $mABS = GUICtrlCreateMenu("&ABS")     $mEndpoint_ABS = GUICtrlCreateMenu("&Endpoint",$mABS,1)         $mWavelengths_ABS = GUICtrlCreateMenuItem("Wavelenghts",$mEndpoint_ABS)         $PlateType_ABS = GUICtrlCreateMenuItem("Plate Type",$mEndpoint_ABS)         $ReadArea_ABS = GUICtrlCreateMenuItem("Read Area",$mEndpoint_ABS)         $Shake_ABS = GUICtrlCreateMenuItem("Shake",$mEndpoint_ABS)         $SpeedRead_ABS = GUICtrlCreateMenuItem ("Speed Read",$mEndpoint_ABS)         $MoreSettings_ABS = GUICtrlCreateMenuItem ("More Settings",$mEndpoint_ABS)     $mKinetic_ABS = GUICtrlCreateMenu("&Kinetic",$mABS,1)     $mWellScan_ABS = GUICtrlCreateMenu("&Well Scan",$mABS,1)     $mSpectrum_ABS = GUICtrlCreateMenu("&Spectrum",$mABS,1) $mFRET = GUICtrlCreateMenu("&FRET")     $mEndpoint_FRET = GUICtrlCreateMenu("&Endpoint",$mFRET,1)         $mWavelengths_FRET = GUICtrlCreateMenuItem("Wavelenghts",$mEndpoint_FRET)         $PlateType_FRET = GUICtrlCreateMenuItem("Plate Type",$mEndpoint_FRET)         $ReadArea_FRET = GUICtrlCreateMenuItem("Read Area",$mEndpoint_FRET)         $PTMuOptics_FRET = GUICtrlCreateMenuItem("PTM and Optics", $mEndpoint_FRET)         $Shake_FRET = GUICtrlCreateMenuItem("Shake", $mEndpoint_FRET)         $MoreSettings_FRET = GUICtrlCreateMenuItem("More Settings", $mEndpoint_FRET)     $mKinetic_FRET = GUICtrlCreateMenu("&Kinetic",$mFRET,1)     $mWellScan_FRET = GUICtrlCreateMenu("&Well Scan",$mFRET,1) $mLUM = GUICtrlCreateMenu("&LUM")     $mEndpoint_LUM = GUICtrlCreateMenu("&Endpoint",$mLUM,1)         $mWavelengths_LUM = GUICtrlCreateMenuItem("Wavelenghts",$mEndpoint_LUM)         $PlateType_LUM = GUICtrlCreateMenuItem("Plate Type",$mEndpoint_LUM)         $ReadArea_LUM = GUICtrlCreateMenuItem("Read Area",$mEndpoint_LUM)         $PTMuOptics_LUM = GUICtrlCreateMenuItem("PTM and Optics",$mEndpoint_LUM)         $Shake_LUM = GUICtrlCreateMenuItem("Shake", $mEndpoint_LUM)         $MoreSettings_LUM = GUICtrlCreateMenuItem ("More Settings",$mEndpoint_LUM)     $mKinetic_LUM = GUICtrlCreateMenu("&Kinetic",$mLUM, 1)     $mWellScan_LUM = GUICtrlCreateMenu("&Well Scan",$mLUM, 1)     $mSpectrum_LUM = GUICtrlCreateMenu("&Spectrum",$mLUM, 1) $mFragezeichen = GUICtrlCreateMenu("&?")     $mHelp_Fragezeichen = GUICtrlCreateMenuItem("Help"&@TAB&"F1", $mFragezeichen) $Button_Cancel = GUICtrlCreateButton("Cancel", 450, 370, 70, 20) $Button_OK = GUICtrlCreateButton("OK", 530, 370, 70, 20)     GUICtrlSetState(-1,$GUI_FOCUS) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### Func Wavelengths ()     $Label_Wavelenghts = GUICtrlCreateLabel("Wavelength Settings", 10, 10, 170, 20)     $Label_NumberW = GUICtrlCreateLabel("Number of Wavelenghts:", 10, 40, 170, 20)     $Input_Wavelenghts = GUICtrlCreateInput ("", 150, 37, 70, 20)     GUICtrlCreateUpdown($Input_Wavelenghts)     $Label_Lm1 = GUICtrlCreateLabel("Lm1", 120, 70, 20, 20)     $Input_Lm1 = GUICtrlCreateInput("", 150, 67, 70, 20)     $Label_nm = GUICtrlCreateLabel("nm", 230, 70, 70, 20) EndFunc Func PlateTyp ()     $Label_PlateType = GUICtrlCreateLabel("Plate Type Settings", 10, 10, 170, 20)     $Label_NumberP = GUICtrlCreateLabel("Number of Plates:", 10, 40, 170, 20)     $Input_NumberP = GUICtrlCreateInput("",120, 37, 70, 20) EndFunc Func ReadArea ()     $Label_ReadArea = GUICtrlCreateLabel("Read Area Settings", 10, 10, 170, 20)             $Checkbox_allWells = GUICtrlCreateCheckbox("Select All", 500, 10, 97, 17)             Local $Pic_Wellplate = GUICtrlCreatePic("C:\Users\Admin\Pictures\Wellplatepic.jpg", 70, 40, 467, 320)             GUISetState(@SW_SHOW) EndFunc Func PTMuOptics ()     $Label_PTMuOptics = GUICtrlCreateLabel("PTM and Optics Settings", 10, 10, 170, 20) EndFunc Func Shake ()     $Label_Shake = GUICtrlCreateLabel("Shake Settings", 10, 10, 170, 20)     $Label_Shake_Question = GUICtrlCreateLabel("Should the plate be shaken?", 10, 40, 170, 20)     $Checkbox_Shake_Yes = GUICtrlCreateCheckbox("Yes", 160, 37, 170, 20)     $Checkbox_Shake_No = GUICtrlCreateCheckbox("No", 250, 37, 170, 20)     $Label_Shakespeed = GUICtrlCreateLabel("Shaking speed:", 10, 70, 170,20)     $Input_Shakespeed = GUICtrlCreateInput("",120, 70, 70, 20) EndFunc While 1 ; FEHLER: Ausgeführte FUnktionen schließen sich nicht und überlagern die Oberfläche     $nMsg = GUIGetMsg()     Switch $nMsg         Case $GUI_EVENT_CLOSE, $Button_Cancel, $mExit             Exit         Case $mOpen ; AUSSTEHEND: "OK" Button verlinken             FileOpenDialog (" Open some File...", @WindowsDir, "All(*.*)")         Case $mWavelengths_ABS             Wavelengths ()         Case $mWavelengths_FRET             Wavelengths ()         Case $mWavelengths_LUM             Wavelengths ()         Case $PlateType_ABS             PlateTyp ()         Case $PlateType_FRET             PlateTyp ()         Case $PlateType_LUM             PlateTyp ()         Case $ReadArea_ABS             ReadArea ()         Case $ReadArea_FRET             ReadArea ()         Case $ReadArea_LUM             ReadArea ()         Case $PTMuOptics_FRET             PTMuOptics ()         Case $PTMuOptics_LUM             PTMuOptics ()         Case $Shake_ABS             Shake ()         Case $Shake_FRET             Shake ()         Case $Shake_LUM             Shake ()         Exit     EndSwitch WEnd Select
×
×
  • Create New...