Schaffung eines "openfile"

  • Ich habe eine lis ($ Liste1 = GUICtrlCreateList) aus erhält Informationen "C: \ Benutzer \ Desktop \ AutoIt \ programme \ Listen \ list1.txt"
    aber ich will $ file menu = GUICtrlCreateMenu automatisch auflisten "C: \ Benutzer \ Desktop \ AutoIt \ programme \ andere Liste \ list1.txt" in einen anderen Ordner
    dann öffnet, Kann mir jemand bitte helfen.
    dies ist mein Menü


    [autoit]

    Local $defaultstatus = "Ready", $filemenu, $fileitem
    Local $helpmenu, $infoitem, $exititem, $recentfilesmenu
    Local $viewmenu, $viewstatusitem, $cancelbutton
    Local $statuslabel, $msg, $file

    $filemenu = GUICtrlCreateMenu("&File")
    $fileitem = GUICtrlCreateMenuItem("Open", $filemenu)
    GUICtrlSetState(-1, $GUI_DEFBUTTON)
    $createitem = GUICtrlCreateMenuItem("create", $filemenu)
    GUICtrlSetState(-1, $GUI_DEFBUTTON)
    $helpmenu = GUICtrlCreateMenu("info")
    $registers = GUICtrlCreateMenu("Register")
    $savefile = GUICtrlCreateMenuItem("Save", $filemenu)
    $saveas = GUICtrlCreateMenuItem("Save as", $filemenu)
    ;~ GUICtrlSetState(-1, $GUI_DISABLE)
    $infoitem = GUICtrlCreateMenuItem("Info", $helpmenu)
    $exititem = GUICtrlCreateMenuItem("Exit", $filemenu)
    $recentfilesmenu = GUICtrlCreateMenu("Recent Files", $filemenu, 1,) ;~ Anzeigen von Dateien in "anderen liste"

    [/ autoit]


    Ich benutze Google Translate, denn ich kann nicht Deutsch, sondern nur auf Niederländisch :) zu sprechen, wenn Sie sagen, ot unsicher möchten

  • Was sollten uns diese "sinnlos" gestalteten Zeilen sagen?
    Löschen und bitte richtig posten. :(

    Lieben Gruß,
    Alina

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Geheime Information: ;)
    OuBVU5ebLhHu5QvlnAyQB4A7SzBrvWulwL7RLl2BdH5tI6sIYspeMKeXMSXl

  • Zitat

    [...] Ik gebruik: Google Translate, want ik kan [...]

    Okay, dieses gewurschtel da oben versteht doch kein Mensch. :D


    viper93:
    I'm very sorry buddy, but I can't understand you.
    Can you speak English?

    €dit:
    Aha, jetzt kann man auch was lesen ^^
    Mal schauen :x

  • das ertse schon verstanden, nur ich lese doch nicht stundenlang etwas, das man auch ordentlich posten kann. SORRY, auch wenn jetzt einige denken: "Zicke", so bin ich halt.

    Lieben Gruß,
    Alina

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Geheime Information: ;)
    OuBVU5ebLhHu5QvlnAyQB4A7SzBrvWulwL7RLl2BdH5tI6sIYspeMKeXMSXl

  • Oke guys my apologies.

    This is what I wanted to say :) :

    Creating Open File.

    I have a List that reads the information from note : "C:\User\Desktop\autoit\programma\lists\list1.txt"
    the is called "list1" as you can see.
    But I also have other lists with different information,("C:\User\Desktop\autoit\programma\Other\August")
    so at this moment I manual replace the note "list1" from the August fille in the "Other" map in the "Lists" map
    so it will open the other note with the other information

    I would like to do this process automticy I already created a menu with a "file" drop down buttons with "Open" and "Create"
    with the open I got this:
    $findfiles = GUICtrlCreateMenu("Find Files", $filemenu, 1,)
    So when you lay your mouse on the "Find files" option a other small menu will pop out
    it this second dropdown menu I would like to have all the map names (like map:August) be shown in the second dropdown,
    I would like to know how I can do this.

    This is my menu:

    Local $defaultstatus = "Ready", $filemenu, $fileitem
    Local $helpmenu, $infoitem, $exititem, $recentfilesmenu
    Local $viewmenu, $viewstatusitem, $cancelbutton
    Local $statuslabel, $msg, $file

    $filemenu = GUICtrlCreateMenu("&File")
    $fileitem = GUICtrlCreateMenuItem("Open", $filemenu)
    GUICtrlSetState(-1, $GUI_DEFBUTTON)
    $createitem = GUICtrlCreateMenuItem("create", $filemenu)
    GUICtrlSetState(-1, $GUI_DEFBUTTON)
    $helpmenu = GUICtrlCreateMenu("info")
    $registers = GUICtrlCreateMenu("Register")
    $savefile = GUICtrlCreateMenuItem("Save", $filemenu)
    $saveas = GUICtrlCreateMenuItem("Save as", $filemenu)
    ;~ GUICtrlSetState(-1, $GUI_DISABLE)
    $infoitem = GUICtrlCreateMenuItem("Info", $helpmenu)
    $exititem = GUICtrlCreateMenuItem("Exit", $filemenu)
    $recentfilesmenu = GUICtrlCreateMenu("Recent Files", $filemenu, 1,) ;~Viewing files from the "other list"

  • Du verstehst uns auf deutsch? Dann bitte auch versuchen in deutsch zu posten. Nicht alle können hier englisch und es ist ein deutsches Forum. Ich spreche hier auch deutsch und kein dänisch. Das gebietet schon die Höflichkeit, oder irre ich mich da? Ansonsten empfehle ich Dir die englische Seite, aber nicht das Du denkst, ich möchte Dich hier vertreiben, aber da kann Dir dann besser geholfen werden, als wenn wir hier für dich Deinen Text für alle dann übersetzen.
    .
    Ist nicht böse gemeint, nur ich meine, das man in einer Gemeinschaft versucht gemeinsam eine Sprache zu sprechen und hier ist es nicht nur "AutoIt". Okay?

    Englisches Seite: http://www.autoitscript.com

    Lieben Gruß,
    Alina

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Geheime Information: ;)
    OuBVU5ebLhHu5QvlnAyQB4A7SzBrvWulwL7RLl2BdH5tI6sIYspeMKeXMSXl

    Einmal editiert, zuletzt von Alina (26. Oktober 2014 um 15:22)

  • Sorry alina Im trying to undertand what you are saying but its very hard with Google Translate so I dont really understand you, could you please talk English If that is possible

  • Sure, here are spoken englsich and Google helps everyone, but you'll have more success on the English side. And please post the script entirely. I see it myself then later.

    Lach mich gerade über die Googleübersetzung weg. Mußte die erst einmal suchen, aber zum verstehen sollte die Übersetzung reichen.

    Lieben Gruß,
    Alina

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Geheime Information: ;)
    OuBVU5ebLhHu5QvlnAyQB4A7SzBrvWulwL7RLl2BdH5tI6sIYspeMKeXMSXl

    • Offizieller Beitrag

    Alina, bitte sei nicht so zickig. ;)
    Schließlich wurde der TE von einem User gebeten auf englisch zu posten, jetzt postet er englisch und nun fährst du ihm in die Parade. Der Ärmste ist doch total verwirrt.

    @viper93
    Alina says, you should post in the AutoItscript.com forum. There is the default language english and so you will get more response.

  • SORRY

    Lieben Gruß,
    Alina

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Geheime Information: ;)
    OuBVU5ebLhHu5QvlnAyQB4A7SzBrvWulwL7RLl2BdH5tI6sIYspeMKeXMSXl

  • Okey, I think I know what you mean.
    You can find the Files with FileFindFirstFile() and FileFindNextFile().
    The Files can you add in your Menu with GUICtrlCreateMenuItem() or _GUICtrlMenu_AddMenuItem().

    Example:

    [autoit]

    $sPath = 'C:'
    $hSearch = FileFindFirstFile('*.*')

    [/autoit][autoit][/autoit][autoit]

    $hGUI = GUICreate('')
    $idMenu = GUICtrlCreateMenu('Files')
    $idOpen = GUICtrlCreateMenu('Open', $idMenu)

    [/autoit][autoit][/autoit][autoit]

    While True
    $sFile = FileFindNextFile($hSearch)
    If @error Then ExitLoop
    GUICtrlCreateMenuItem($sFile, $idOpen)
    WEnd

    [/autoit][autoit][/autoit][autoit]

    GUISetState()

    [/autoit][autoit][/autoit][autoit]

    While GUIGetMsg() <> -3
    WEnd

    [/autoit]
  • Hi Bugfix

    I have tryed to ask for help on the autoItscript.com in the past but there response usually takes allong time and there answers are not really helping me out.
    so I thought I would ask for help from my neightour country :P
    this looks like way better help forum so if you guys could help I would be happy

    This is the rest of my script its a very large script over 40.000 lines so I would take out all the important parts

    I actuelly think thats the only importand part

    My goal is that I can see all the maps in the "othermap" for example
    ("C:\User\Desktop\autoit\programma\Other\august")
    and when i click on the it automaticly reads the notes that are in the map for the

    $List1 = GUICtrlCreateList("", 0, 64, 145, 358)
    GUICtrlSetData(-1, "")

    because now it only reads the information on start-up
    "C:\User\Desktop\autoit\programma\list"

  • Thank you Make-Grafi That was exaclty what i want but somehow it opens the wrong map and only shows random note file's
    I adjusted the code but i dont know if im doing something wrong:

    it seems it opens the filles and maps from: C:\Users\joesoef pc\Desktop\autoit\programma

  • https://www.autoitscript.com/autoit3/docs/f…ndFirstFile.htm

    In the first Parameter you can use Wildcards.
    With the Wildcard "*.*" find you all files.
    If you want text files then must you use *.txt as first parameter for example.
    For other files use another file extension. :)

    [autoit]

    $sPath = "C:\Users\joesoef pc\Desktop\autoit\programma\lijsten\lijsten2\"
    $hSearch = FileFindFirstFile('*.txt') ; I have changed this :x

    [/autoit][autoit][/autoit][autoit]

    ;~ $hGUI = GUICreate('')
    ;~ $idMenu = GUICtrlCreateMenu('Files')
    $idOpen = GUICtrlCreateMenu('Open34', $filemenu)

    [/autoit][autoit][/autoit][autoit]

    While True
    $sFile = FileFindNextFile($hSearch)
    If @error Then ExitLoop
    GUICtrlCreateMenuItem($sFile, $idOpen)
    WEnd

    [/autoit][autoit][/autoit][autoit]

    FileClose($hSearch) ; I had forgotten that.

    [/autoit][autoit][/autoit][autoit]

    GUISetState()
    While GUIGetMsg() <> -3
    WEnd

    [/autoit]
  • Alright, is it also possible that it only shows the name of the map in directy like: "C:\Users\joesoef pc\Desktop\autoit\programma\lijsten\lijsten2\"

    ($sPath = "C:\Users\joesoef pc\Desktop\autoit\programma\lijsten\lijsten2\" inside ma lijsen2 there are 4 maps , map1,map2,map3,map4 inside one of these 4 maps there are s text files: list1,list2... <-- where its al about)

    so when i click on one of these map it uses the text for the "GUICtrlCreateList"

  • I think I almost got it but somehow its not working, can somebody take a look at this

    in lijst2 there are 4 maps with a list1.txt and a list4.txt

    but I dont know why its not working.