1. Dashboard
  2. Mitglieder
    1. Letzte Aktivitäten
    2. Benutzer online
    3. Team
    4. Mitgliedersuche
  3. Forenregeln
  4. Forum
    1. Unerledigte Themen
  • Anmelden
  • Registrieren
  • Suche
Alles
  • Alles
  • Artikel
  • Seiten
  • Forum
  • Erweiterte Suche
  1. AutoIt.de - Das deutschsprachige Forum.
  2. Mitglieder
  3. viper93

Beiträge von viper93

  • press button

    • viper93
    • 28. Februar 2015 um 12:54

    want click this button:

    Code
    <div class="btn3">
    
    
        button
    
    
    </div>

    I tried this

    Code
    $oButton2 = _FFXPath("//div [@class='btn3']")
                        _FFClick($oButton2)

    but somehow it didnt work and clicked the wrong button:

    Code
    <a class="add-btn3-wrap" href="/add_edit_sites"><span>&nbsp;</span><div class="btn3">Add Site/Page</div></a>
    <div class="add_siteitem">

    I use firefox at the moment but if i must use IE than thats ok as well

    hope to get a reply soon

  • _FFFormOptionSelect

    • viper93
    • 19. Februar 2015 um 20:42

    I want to select one out of these optionselections:

    Code
    <div class="_5k_5">
    
    
    
    
    <span id="u_0_i" class="_5k_4" data-name="birthday_wrapper" data-type="selectors">
    <span>
    <select id="day" class="_5dbba" title="Dag" name="birthday_day" aria-label="Dag">
    
    
    <option selected="1" value="0"></option><option value="1"></option><option value="2"></option><option value="3"></option><option value="4"></option><option value="5"></option><option value="6"></option><option value="7"></option><option value="8"></option><option value="9"></option><option value="10"></option><option value="11"></option><option value="12"></option><option value="13"></option><option value="14"></option><option value="15"></option><option value="16"></option><option value="17"></option><option value="18"></option><option value="19"></option><option value="20"></option><option value="21"></option><option value="22"></option><option value="23"></option><option value="24"></option><option value="25"></option><option value="26"></option>
    
    
    
    
    </select><select id="month" class="_5dbba" title="Maand" name="birthday_month" aria-label="Maand"></select><select id="year" class="_5dbba" title="Jaar" name="birthday_year" aria-label="Jaar"></select>
    Alles anzeigen

    I tried this:


    _FFFormOptionSelect("u_0_i","id","value","15","day","id")

  • IEFormElementRadioSelect

    • viper93
    • 18. Februar 2015 um 23:45

    it is for facebook but im not trying to create bots, but its for my own website thats about social media, so my idea was to make a quick sign up for social media website because allot of people having a hard time signing up so I create a simple tutorial for them, and they dont have to leave my website

  • IEFormElementRadioSelect

    • viper93
    • 18. Februar 2015 um 23:23

    im not trying to create bots i just want to log in for once on my own website so i dont have to go the website and people can sign in intro my website

  • IEFormElementRadioSelect

    • viper93
    • 18. Februar 2015 um 23:01

    did not work it gives a error: --> Press Ctrl+Alt+F5 to Restart or Ctrl+Break to Stop
    --> IE.au3 T3.0-1 Error from function _IEFormElementRadioSelect, $_IEStatus_InvalidObjectType

  • IEFormElementRadioSelect

    • viper93
    • 18. Februar 2015 um 21:26

    source:

    Code
    <div id="u_0_f" class="mtm _5wa2 _5dbb">
    
    
        <span id="u_0_g" class="_5k_3" data-name="c" data-type="radio">
            <span class="_5k_2 _5dba"></span>
            <span class="_5k_2 _5dba">
                <input id="u_0_e" type="radio" value="2" name="sex"></input>
                <label class="_58mt" for="u_0_e">
    
    
                    Man
    
    
                </label>
            </span>
        </span>
    Alles anzeigen


    my code:

    Code
    Local $oForm = _IEGetObjById($oIE, "u_0_f")
    local $s_name = _IEGetObjByName($oIE, "sex")
     _IEFormElementRadioSelect($oForm, , $s_name, 1, "byValue")
        Sleep(1000)

    what am i doing wrong?

  • How To Get Number In <Span

    • viper93
    • 15. Dezember 2014 um 14:43

    ok im sorry

    ik can not post the source code because its to long, its a page from twitter,
    I wil give you a random account link: https://twitter.com/HelmerTilmans
    as you can see this guy got 10 followers and is following 173 people
    but I would like to have these numbers.

  • How To Get Number In <Span

    • viper93
    • 15. Dezember 2014 um 14:25

    now it only shows the number 9 in the msgbox
    but it has to read from the webpage and this number can change al the time

  • How To Get Number In <Span

    • viper93
    • 15. Dezember 2014 um 14:03

    I only need the number 9 from this code:

    Code
    class="<span class="ProfileNav-value" data-is-compact="false">
    
    
        9
    
    
    </span>"

    How can i achive that?

  • While and EndSwitch WEnd dont work

    • viper93
    • 11. November 2014 um 17:13

    sorry I already solved it

  • While and EndSwitch WEnd dont work

    • viper93
    • 11. November 2014 um 15:53

    I am trying to run this

    C
    $_FF_COM_TRACE = True
    #include <MsgBoxConstants.au3>
    #include <ButtonConstants.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <GUIListBox.au3>
    #include <WindowsConstants.au3>
    ;#include <FF.au3>
    #include <staticConstants.au3>
    #include <IE.au3>
    #include <String.au3>
    #include <Excel.au3>
    #include <FileConstants.au3>
    #include <IE.au3>
    #include <String.au3>
    #include <GUIConstantsEx.au3>
    #include "GUIExtender.au3"
    #include <FileConstants.au3>
    #include <MsgBoxConstants.au3>
    #include <StringConstants.au3>
    Local $oIE
    ;, BitOR($WS_BORDER, $WS_VSCROLL)
    
    
    ;_FFStart( "https://www.google.nl" )
    ;WinSetState ( "Google - Mozilla Firefox", "", @SW_MINIMIZE )
    
    
    ;~ _GUIExtender_Init($Form1_1_1_1)
    
    
    For $i = 1 To 13
    FileDelete(@ScriptDir & "\list" & $i & ".txt")
    FileWrite(@ScriptDir & "\list" & $i & ".txt", "text " & $i)
    Next
    
    
    Global $iIndex = 0
    #Region ### START Koda GUI section ### Form=
    $Form1_1_1_1 = GUICreate("program", 814, 713, 697, 101)
    $Button1 = GUICtrlCreateButton("Next", 208, 0, 41, 25)
    $List1 = GUICtrlCreateList("", 0, 64, 145, 358)
    GUICtrlSetData(-1, "")
    $List2 = GUICtrlCreateList("", 144, 64, 65, 358)
    GUICtrlSetData(-1, "")
    $List3 = GUICtrlCreateList("", 208, 64, 65, 358)
    GUICtrlSetData(-1, "")
    $List4 = GUICtrlCreateList("", 344, 64, 153, 358)
    GUICtrlSetData(-1, "")
    $List5 = GUICtrlCreateList("", 496, 64, 65, 358)
    GUICtrlSetData(-1, "")
    $List6 = GUICtrlCreateList("", 560, 64, 121, 230)
    GUICtrlSetData(-1, "")
    $List7 = GUICtrlCreateList("", 680, 64, 65, 230)
    GUICtrlSetData(-1, "")
    $List8 = GUICtrlCreateList("", 744, 64, 65, 230)
    GUICtrlSetData(-1, "")
    $List9 = GUICtrlCreateList("", 272, 64, 65, 358)
    GUICtrlSetData(-1, "")
    
    
    GUISetState(@SW_SHOW)
    
    
    Local $helpmenu, $infoitem, $exititem, $recentfilesmenu
    Local $viewmenu, $viewstatusitem
    Local $statuslabel, $msg, $file
    
    
    $filemenu = GUICtrlCreateMenu("&File")
    $fileitem = GUICtrlCreateMenuItem("Open", $filemenu)
    GUICtrlSetState(-1, $GUI_DEFBUTTON)
    $newitem = GUICtrlCreateMenuItem("new", $filemenu)
    $helpmenu = GUICtrlCreateMenu("?")
    GUICtrlCreateMenuItem("Save", $filemenu)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $infoitem = GUICtrlCreateMenuItem("Info", $helpmenu)
    $exititem = GUICtrlCreateMenuItem("Exit", $filemenu)
    $recentfilesmenu = GUICtrlCreateMenu("Recent Files", $filemenu, 1)
    
    
    GUICtrlCreateMenuItem("", $filemenu, 2) ; create a separator line
    
    
    $viewmenu = GUICtrlCreateMenu("View", -1, 1) ; is created before "?" menu
    $viewstatusitem = GUICtrlCreateMenuItem("Statusbar", $viewmenu)
    $message4 = GUICtrlCreateMenuItem("message", $filemenu)
    
    
    GUICtrlSetState(-1, $GUI_FOCUS)
    
    
    GUISetState(@SW_SHOW)
    
    
    ; Loop until the user exits.
    While 1
    
    
    $msg = GUIGetMsg()
    
    
    If $msg = $fileitem Then
    ConsoleWrite("Hit" & @CRLF)
    
    
    $file = FileOpenDialog("Choose file...", @TempDir, "All (*.*)")
    If @error <> 1 Then
    GUICtrlCreateMenuItem($file, $recentfilesmenu)
    _FillLists($file)
    EndIf
    EndIf
    if $msg = $newitem Then
    $newitem = FileSaveDialog("Choose file...", @TempDir, "All (*.*)")
    
    
    EndIf
    If $msg = $viewstatusitem Then
    If BitAND(GUICtrlRead($viewstatusitem), $GUI_CHECKED) = $GUI_CHECKED Then
    GUICtrlSetState($viewstatusitem, $GUI_UNCHECKED)
    GUICtrlSetState($statuslabel, $GUI_HIDE)
    Else
    GUICtrlSetState($viewstatusitem, $GUI_CHECKED)
    GUICtrlSetState($statuslabel, $GUI_SHOW)
    EndIf
    EndIf
    If $msg = $GUI_EVENT_CLOSE Or $msg = $exititem Then ExitLoop
    
    
    If $msg = $infoitem Then MsgBox($MB_SYSTEMMODAL, "Info", "Only a test...")
    
    
                $iIndex += 1
                If $iIndex = _GUICtrlListBox_GetCount($List1) Then $iIndex = 0
                _GUICtrlListBox_SetCurSel($List1, $iIndex)
    
    
                If $iIndex = _GUICtrlListBox_GetCount($List4) Then $iIndex = 0
                _GUICtrlListBox_SetCurSel($List4, $iIndex)
    
    
                If $iIndex = _GUICtrlListBox_GetCount($List2) Then $iIndex = 0
                _GUICtrlListBox_SetCurSel($List2, $iIndex)
    
    
                If $iIndex = _GUICtrlListBox_GetCount($List3) Then $iIndex = 0
                _GUICtrlListBox_SetCurSel($List3, $iIndex)
    
    
                If $iIndex = _GUICtrlListBox_GetCount($List9) Then $iIndex = 0
                _GUICtrlListBox_SetCurSel($List9, $iIndex)
    
    
                If $iIndex = _GUICtrlListBox_GetCount($List5) Then $iIndex = 0
                _GUICtrlListBox_SetCurSel($List5, $iIndex)
    
    
    WEnd
    
    
    GUIDelete()
    
    
    #EndRegion ### END Koda GUI section ###
    
    
    Func _FillLists($file)
    
    
    Local $newfile = StringReplace($file, "Openfile.txt", "")
    
    
    $1newfile = ($newfile & ("lists\list"))
    
    
    Global $iIndex = 0, $sListData1 = ($1newfile & ("1.txt"))
    Global $sListFile1 = ($1newfile & ("1.txt"))
    
    
    Global $iIndex = 0, $sListData2 = ($1newfile & ("2.txt"))
    Global $sListFile2 = ($1newfile & ("2.txt"))
    
    
    Global $iIndex = 0, $sListData3 = ($1newfile & ("3.txt"))
    Global $sListFile3 = ($1newfile & ("3.txt"))
    
    
    Global $iIndex = 0, $sListData4 = ($1newfile & ("4.txt"))
    Global $sListFile4 = ($1newfile & ("4.txt"))
    
    
    Global $iIndex = 0, $sListData5 = ($1newfile & ("5.txt"))
    Global $sListFile5 = ($1newfile & ("5.txt"))
    
    
    Global $iIndex = 0, $sListData6 = ($1newfile & ("6.txt"))
    Global $sListFile6 = ($1newfile & ("6.txt"))
    
    
    Global $iIndex = 0, $sListData7 = ($1newfile & ("7.txt"))
    Global $sListFile7 = ($1newfile & ("7.txt"))
    
    
    Global $iIndex = 0, $sListData8 = ($1newfile & ("8.txt"))
    Global $sListFile8 = ($1newfile & ("8.txt"))
    
    
    Global $iIndex = 0, $sListData9 = ($1newfile & ("9.txt"))
    Global $sListFile9 = ($1newfile & ("9.txt"))
    
    
    Global $iIndex = 0, $sListData10 = ($1newfile & ("10.txt"))
    Global $sListFile10 = ($1newfile & ("10.txt"))
    
    
    Global $iIndex = 0, $sListData11 = ($1newfile & ("11.txt"))
    Global $sListFile11 = ($1newfile & ("11.txt"))
    
    
    Global $iIndex = 0, $sListData12 = ($1newfile & ("12.txt"))
    Global $sListFile12 = ($1newfile & ("12.txt"))
    
    
    Global $iIndex = 0, $sListData13 = ($1newfile & ("13.txt"))
    Global $sListFile13 = ($1newfile & ("13.txt"))
    
    
    ; Read saved file if it exists--------
    If FileExists($sListFile1) Then
    $sListData1 = FileRead($sListFile1)
    Else
    MsgBox($MB_SYSTEMMODAL, "Error", $sListFile1 & " does not exist") ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
    EndIf
    
    
    ; Load data read from the file
    GUICtrlSetData($List1, $sListData1)
    _GUICtrlListBox_SetCurSel($List1, $iIndex)
    
    
    ; Read saved file if it exists--------
    If FileExists($sListFile2) Then
    $sListData2 = FileRead($sListFile2)
    EndIf
    
    
    ; Load data read from the file
    GUICtrlSetData($List2, $sListData2)
    _GUICtrlListBox_SetCurSel($List2, $iIndex)
    
    
    ; Read saved file if it exists--------
    If FileExists($sListFile3) Then
    $sListData3 = FileRead($sListFile3)
    EndIf
    
    
    ; Load data read from the file
    GUICtrlSetData($List3, $sListData3)
    _GUICtrlListBox_SetCurSel($List3, $iIndex)
    
    
    ; Read saved file if it exists--------
    If FileExists($sListFile4) Then
    $sListData4 = FileRead($sListFile4)
    EndIf
    
    
    ; Load data read from the file
    GUICtrlSetData($List4, $sListData4)
    _GUICtrlListBox_SetCurSel($List4, $iIndex)
    
    
    ; Read saved file if it exists--------
    If FileExists($sListFile5) Then
    $sListData5 = FileRead($sListFile5)
    EndIf
    
    
    ; Load data read from the file
    GUICtrlSetData($List5, $sListData5)
    _GUICtrlListBox_SetCurSel($List5, $iIndex)
    
    
    ; Read saved file if it exists--------
    If FileExists($sListFile6) Then
    $sListData6 = FileRead($sListFile6)
    EndIf
    
    
    ; Load data read from the file
    GUICtrlSetData($List6, $sListData6)
    _GUICtrlListBox_SetCurSel($List6, $iIndex)
    
    
    ; Read saved file if it exists--------
    If FileExists($sListFile7) Then
    $sListData7 = FileRead($sListFile7)
    EndIf
    
    
    ; Load data read from the file
    GUICtrlSetData($List7, $sListData7)
    _GUICtrlListBox_SetCurSel($List7, $iIndex)
    
    
    ; Read saved file if it exists--------
    If FileExists($sListFile8) Then
    $sListData8 = FileRead($sListFile8)
    EndIf
    
    
    ; Load data read from the file
    GUICtrlSetData($List8, $sListData8)
    _GUICtrlListBox_SetCurSel($List8, $iIndex)
    
    
    ; Read saved file if it exists--------
    If FileExists($sListFile9) Then
    $sListData9 = FileRead($sListFile9)
    EndIf
    
    
    ; Load data read from the file
    GUICtrlSetData($List9, $sListData9)
    _GUICtrlListBox_SetCurSel($List9, $iIndex)
    
    
    ; Read saved file if it exists--------
    If FileExists($sListFile10) Then
    $sListData10 = FileRead($sListFile10)
    EndIf
    
    
    EndFunc
    
    
    While 2
        $nMsg = GUIGetMsg()
        Switch $nMsg
    Case $Button1
    $iIndex += 1
        _GUICtrlListBox_SetCurSel($List1, $iIndex)
    
    
            EndSwitch
    WEnd
    Alles anzeigen


    but the $button1 just runs by itself without me activating it,
    can somebody please take a look at this

  • What Am I Doing Wrong?

    • viper93
    • 30. Oktober 2014 um 19:38

    Thank you Andy, It looks much better, but it stil doesnt open the .txt (note) somehow
    I just have a list1.txt file in this map:C:\Users\joesoef pc\Desktop\autoit\programma\lijsten\lijsten2\names1\list1.txt
    in this list1.txt I got

    Zitat

    eric|sara|brian|jo|selma|bruce1

    etc

    but it doesnt open the txt file with the names the,

    C
    $_FF_COM_TRACE = True
    #include <MsgBoxConstants.au3>
    #include <ButtonConstants.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <GUIListBox.au3>
    #include <WindowsConstants.au3>
    #include <FF.au3>
    #include <staticConstants.au3>
    #include <IE.au3>
    #include <String.au3>
    #include <Excel.au3>
    #include <FileConstants.au3>
    #include <IE.au3>
    #include <String.au3>
    #include <GUIConstantsEx.au3>
    #include "GUIExtender.au3"
    
    
    Local $oIE
    ;, BitOR($WS_BORDER, $WS_VSCROLL)
    
    
    ;_FFStart( "https://www.google.nl" )
    ;WinSetState ( "Google - Mozilla Firefox", "",  @SW_MINIMIZE )
    
    
    ;~ _GUIExtender_Init($Form1_1_1_1)
    
    
    For $i = 1 To 13
        FileDelete(@ScriptDir & "\list" & $i & ".txt")
        FileWrite(@ScriptDir & "\list" & $i & ".txt", "text " & $i)
    Next
    
    
    #Region ### START Koda GUI section ### Form=
    $Form1_1_1_1 = GUICreate("program", 814, 713, 697, 101)
    _GUIExtender_Init($Form1_1_1_1)
    Dim $listnr[11]
    Dim $list[15]
    Dim $sListFile[15]
    Dim $sListData[15]
    $Listnr[1] = GUICtrlCreateList("", 0, 64, 145, 358)
    GUICtrlSetData(-1, "")
    $Listnr[2] = GUICtrlCreateList("", 144, 64, 65, 358)
    GUICtrlSetData(-1, "")
    $Listnr[3] = GUICtrlCreateList("", 208, 64, 65, 358)
    GUICtrlSetData(-1, "")
    $Listnr[4] = GUICtrlCreateList("", 344, 64, 153, 358)
    GUICtrlSetData(-1, "")
    $Listnr[5] = GUICtrlCreateList("", 496, 64, 65, 358)
    GUICtrlSetData(-1, "")
    $Listnr[6] = GUICtrlCreateList("", 560, 64, 121, 230)
    GUICtrlSetData(-1, "")
    $Listnr[7] = GUICtrlCreateList("", 680, 64, 65, 230)
    GUICtrlSetData(-1, "")
    $Listnr[8] = GUICtrlCreateList("", 744, 64, 65, 230)
    GUICtrlSetData(-1, "")
    $Listnr[9] = GUICtrlCreateList("", 272, 64, 65, 358)
    GUICtrlSetData(-1, "")
    
    
    GUISetState(@SW_SHOW)
    
    
    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)
    
    
    GUICtrlCreateMenuItem("", $filemenu, 2) ; create a separator line
    
    
    ;~ $extand = GUICtrlCreateButton("extand", 504, 32, 65, 33)
    
    
    ; I have found this to be the best way to set the section dimensions - see further comments below  <<<<<<<<<<<<<
    ;~ $iEdit_Section_Start = 30
    ;~ $iEdit_Section_Height = 250
    
    
    $iEdit_Section_Start = 30
    $iEdit_Section_Height = 210
    $iEdit_Section = _GUIExtender_Section_Start($Form1_1_1_1, $iEdit_Section_Start, $iEdit_Section_Height)
    _GUIExtender_Section_Action($Form1_1_1_1, $iEdit_Section)
    ; All control positions can then be related to the section start rather than the GUI  <<<<<<<<<<<<<
    
    
    ; Now you can check that the _Section_Height is correct and amend if necessary  <<<<<<<<<<<<<
    _GUIExtender_Section_End($Form1_1_1_1)
    _GUIExtender_Section_Extend($Form1_1_1_1, 0, False)
    
    
        $sPath = @desktopdir & '\autoit\twitter programma\lijsten\lijsten2\'
    $hSearch = FileFindFirstFile($sPath & '*.*')
    
    
    local $mFiles = guictrlcreatemenu('&File')
    
    
    local $List_Start = guictrlcreatedummy() + 1
    While True
            $sFile = FileFindNextFile($hSearch)
            If @error Then ExitLoop
            GUICtrlCreateMenuItem($sFile, $mFiles)
    WEnd
    local $List_End = guictrlcreatedummy() - 1
    
    
    GUISetState()
    
    
    GUISetState()
    Local $iMSG
    While 1
        $iMSG = GUIGetMsg()
        Switch $iMSG
            Case $gui_event_close
                Exit
            Case $List_Start To $List_End
                ConsoleWrite('Clicked = ' & GUICtrlRead($iMSG, 1) & @CRLF)
                For $i = 1 To 13
                    $list[$i] = ("\list" & $i & ".txt")
                Next
                $opgeslagen =  @desktopdir & 'C:\Users\joesoef pc\Desktop\autoit\programma\lijsten\lijsten2\'
                $laden =   (guictrlread($iMSG,1) & @CRLF)
                MsgBox(1, "file:", "" & $opgeslagen & $laden & $list[1])
                Global $iIndex = 0
                For $i = 1 To 13
                    $sListData[$i] = ($opgeslagen & $laden & $list[$i])
                    $sListFile[$i] = ($opgeslagen & $laden & $list[$i])
                Next
                For $i = 1 To 10
                    If FileExists($sListFile[$i]) Then
                        $sListData[$i] = FileRead($sListFile[$i])
                        GUICtrlSetData($Listnr[$i], $sListData[$i])
                        _GUICtrlListBox_SetCurSel($Listnr[$i], $iIndex)
                    EndIf
                Next
        EndSwitch
    WEnd
    
    
    #EndRegion ### END Koda GUI section ###
    Alles anzeigen

    when I run this script
    and click the last file it shows me 4 maps (that i created) they al have a list1 to list9
    Im trying al day to figure this out but unsuccessful, please help me

  • What Am I Doing Wrong?

    • viper93
    • 29. Oktober 2014 um 19:56

    This is the script I try to run:

    C
    $_FF_COM_TRACE = True
    #include <MsgBoxConstants.au3>
    #include <ButtonConstants.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <GUIListBox.au3>
    #include <WindowsConstants.au3>
    #include <FF.au3>
    #include <staticConstants.au3>
    #include <IE.au3>
    #include <String.au3>
    #include <Excel.au3>
    #include <FileConstants.au3>
    #include <IE.au3>
    #include <String.au3>
    #include <GUIConstantsEx.au3>
    #include "GUIExtender.au3"
    
    
    #Region ### START Koda GUI section ### Form=
    $Form1_1_1_1 = GUICreate("form", 814, 713, 697, 101)
    _GUIExtender_Init($Form1_1_1_1)
    $List1 = GUICtrlCreateList("", 0, 64, 145, 358)
    GUICtrlSetData(-1, "")
    $List2 = GUICtrlCreateList("", 144, 64, 65, 358)
    GUICtrlSetData(-1, "")
    $List3 = GUICtrlCreateList("", 208, 64, 65, 358)
    GUICtrlSetData(-1, "")
    $List4 = GUICtrlCreateList("", 344, 64, 153, 358)
    GUICtrlSetData(-1, "")
    $List5 = GUICtrlCreateList("", 496, 64, 65, 358)
    GUICtrlSetData(-1, "")
    $List6 = GUICtrlCreateList("", 560, 64, 121, 230)
    GUICtrlSetData(-1, "")
    $List7 = GUICtrlCreateList("", 680, 64, 65, 230)
    GUICtrlSetData(-1, "")
    $List8 = GUICtrlCreateList("", 744, 64, 65, 230)
    GUICtrlSetData(-1, "")
    $List9 = GUICtrlCreateList("", 272, 64, 65, 358)
    GUICtrlSetData(-1, "")
    
    
    GUISetState(@SW_SHOW)
    
    
    ;~ $extand = GUICtrlCreateButton("extand", 504, 32, 65, 33)
    
    
    ;~ $iEdit_Section_Start = 30
    ;~ $iEdit_Section_Height = 250
    
    
    $iEdit_Section_Start = 30
    $iEdit_Section_Height = 210
    $iEdit_Section = _GUIExtender_Section_Start($Form1_1_1_1, $iEdit_Section_Start, $iEdit_Section_Height)
    _GUIExtender_Section_Action($Form1_1_1_1, $iEdit_Section)
    ; All control positions can then be related to the section start rather than the GUI  <<<<<<<<<<<<<
    
    
    ; Now you can check that the _Section_Height is correct and amend if necessary  <<<<<<<<<<<<<
    _GUIExtender_Section_End($Form1_1_1_1)
    _GUIExtender_Section_Extend($Form1_1_1_1, 0, False)
    
    
    $sPath = @desktopdir & '\autoit\twitter programma\lijsten\lijsten2\'
    $hSearch = FileFindFirstFile($sPath & '*.*')
    
    
    local $mFiles = guictrlcreatemenu('&File')
    
    
    local $List_Start = guictrlcreatedummy() + 1
    While True
            $sFile = FileFindNextFile($hSearch)
            If @error Then ExitLoop
            GUICtrlCreateMenuItem($sFile, $mFiles)
    WEnd
    local $List_End = guictrlcreatedummy() - 1
    
    
    GUISetState()
    
    
    local $iMSG
    while 1
        $iMSG = guigetmsg()
        switch $iMSG
            case $gui_event_close
                Exit
            case $List_Start to $List_End
                ConsoleWrite('Clicked = ' & guictrlread($iMSG,1) & @CRLF)
    
    
    $list1 = ("\list1.txt")
    $list2 = ("\list2.txt")
    $list3 = ("\list3.txt")
    $list4 = ("\list4.txt")
    $list5 = ("\list5.txt")
    $list6 = ("\list6.txt")
    $list7 = ("\list7.txt")
    $list8 = ("\list8.txt")
    $list9 = ("\list9.txt")
    $list10 = ("\list10.txt")
    $list11 = ("\list11.txt")
    $list12 =  ("\list12.txt")
    $list13 = ("\list13.txt")
    $opgeslagen = @desktopdir & 'C:\Users\joesoef pc\Desktop\autoit\programma\lijsten\lijsten2\'
    $laden = guictrlread($iMSG,1) & @CRLF
    
    
                MsgBox(1,"file:","" & $opgeslagen & $laden & $list1)
    
    
    Global $iIndex = 0, $sListData1 = ($opgeslagen & $laden & $list1)
    Global $sListFile1 = ($opgeslagen  & $laden & $list1)
    
    
    Global $iIndex = 0, $sListData2 = ($opgeslagen & $laden & $list2)
    Global $sListFile2 = ($opgeslagen & $laden & $list2)
    
    
    Global $iIndex = 0, $sListData3 = ($opgeslagen & $laden & $list3)
    Global $sListFile3 = ($opgeslagen & $laden & $list3)
    
    
    Global $iIndex = 0, $sListData4 = ($opgeslagen & $laden & $list4)
    Global $sListFile4 = ($opgeslagen & $laden & $list4)
    
    
    Global $iIndex = 0, $sListData5 = ($opgeslagen & $laden & $list5)
    Global $sListFile5 = ($opgeslagen & $laden & $list4)
    
    
    Global $iIndex = 0, $sListData6 = ($opgeslagen & $laden & $list6)
    Global $sListFile6 = ($opgeslagen & $laden & $list6)
    
    
    Global $iIndex = 0, $sListData7 = ($opgeslagen & $laden & $list7)
    Global $sListFile7 = ($opgeslagen & $laden & $list7)
    
    
    Global $iIndex = 0, $sListData8 = ($opgeslagen & $laden & $list8)
    Global $sListFile8 = ($opgeslagen & $laden & $list8)
    
    
    Global $iIndex = 0, $sListData9 = ($opgeslagen & $laden & $list9)
    Global $sListFile9 = ($opgeslagen & $laden & $list9)
    
    
    Global $iIndex = 0, $sListData10 = ($opgeslagen & $laden & $list10)
    Global $sListFile10 = ($opgeslagen & $laden & $list10)
    
    
    Global $iIndex = 0, $sListData11 = ($opgeslagen & $laden & $list11)
    Global $sListFile11 = ($opgeslagen & $laden & $list11)
    
    
    Global $iIndex = 0, $sListData12 = ($opgeslagen & $laden & $list12)
    Global $sListFile12 = ($opgeslagen & $laden & $list12)
    
    
    Global $iIndex = 0, $sListData13 = ($opgeslagen & $laden & $list13)
    Global $sListFile13 = ($opgeslagen & $laden & $list13)
    
    
    If FileExists($sListFile1) Then
        $sListData1 = FileRead($sListFile1)
    EndIf
    
    
    GUICtrlSetData($List1, $sListData1)
    _GUICtrlListBox_SetCurSel($List1, $iIndex)
    
    
    If FileExists($sListFile2) Then
        $sListData2 = FileRead($sListFile2)
    EndIf
    
    
    ; Load data read from the file
    GUICtrlSetData($List2, $sListData2)
    _GUICtrlListBox_SetCurSel($List2, $iIndex)
    
    
    ; Read saved file if it exists--------
    If FileExists($sListFile3) Then
        $sListData3 = FileRead($sListFile3)
    EndIf
    
    
    ; Load data read from the file
    GUICtrlSetData($List3, $sListData3)
    _GUICtrlListBox_SetCurSel($List3, $iIndex)
    
    
    ; Read saved file if it exists--------
    If FileExists($sListFile4) Then
        $sListData4 = FileRead($sListFile4)
    EndIf
    
    
    ; Load data read from the file
    GUICtrlSetData($List4, $sListData4)
    _GUICtrlListBox_SetCurSel($List4, $iIndex)
    
    
    ; Read saved file if it exists--------
    If FileExists($sListFile5) Then
        $sListData5 = FileRead($sListFile5)
    EndIf
    
    
    ; Load data read from the file
    GUICtrlSetData($List5, $sListData5)
    _GUICtrlListBox_SetCurSel($List5, $iIndex)
    
    
    ; Read saved file if it exists--------
    If FileExists($sListFile6) Then
        $sListData6 = FileRead($sListFile6)
    EndIf
    
    
    ; Load data read from the file
    GUICtrlSetData($List6, $sListData6)
    _GUICtrlListBox_SetCurSel($List6, $iIndex)
    
    
    ; Read saved file if it exists--------
    If FileExists($sListFile7) Then
        $sListData7 = FileRead($sListFile7)
    EndIf
    
    
    ; Load data read from the file
    GUICtrlSetData($List7, $sListData7)
    _GUICtrlListBox_SetCurSel($List7, $iIndex)
    
    
    ; Read saved file if it exists--------
    If FileExists($sListFile8) Then
        $sListData8 = FileRead($sListFile8)
    EndIf
    
    
    ; Load data read from the file
    GUICtrlSetData($List8, $sListData8)
    _GUICtrlListBox_SetCurSel($List8, $iIndex)
    
    
    ; Read saved file if it exists--------
    If FileExists($sListFile9) Then
        $sListData9 = FileRead($sListFile9)
    EndIf
    
    
    ; Load data read from the file
    GUICtrlSetData($List9, $sListData9)
    _GUICtrlListBox_SetCurSel($List9, $iIndex)
    
    
    ; Read saved file if it exists--------
    If FileExists($sListFile10) Then
        $sListData10 = FileRead($sListFile10)
    EndIf
    
    
        EndSwitch
    wend
    Alles anzeigen


    If i do this (the old way) it works pefrect but it only opens the same file every time:

    Code
    $Form1_1_1_1 = GUICreate("form", 814, 713, 697, 101)
    $List1 = GUICtrlCreateList("", 0, 64, 145, 358)
    GUICtrlSetData(-1, "")
    $List2 = GUICtrlCreateList("", 144, 64, 65, 358)
    GUICtrlSetData(-1, "")
    $List3 = GUICtrlCreateList("", 208, 64, 65, 358)
    GUICtrlSetData(-1, "")
    $List4 = GUICtrlCreateList("", 344, 64, 153, 358)
    GUICtrlSetData(-1, "")
    $List5 = GUICtrlCreateList("", 496, 64, 65, 358)
    GUICtrlSetData(-1, "")
    $List6 = GUICtrlCreateList("", 560, 64, 121, 230)
    GUICtrlSetData(-1, "")
    $List7 = GUICtrlCreateList("", 680, 64, 65, 230)
    GUICtrlSetData(-1, "")
    $List8 = GUICtrlCreateList("", 744, 64, 65, 230)
    GUICtrlSetData(-1, "")
    $List9 = GUICtrlCreateList("", 272, 64, 65, 358)
    GUICtrlSetData(-1, "")
    
    
    #EndRegion ### END Koda GUI section ###
    
    
    Global $iIndex = 0, $sListData1 = "C:\Users\joesoef pc\Desktop\autoit\twitter programma\lijsten\list1.txt"
    Global $sListFile1 = "C:\Users\joesoef pc\Desktop\autoit\twitter programma\lijsten\list1.txt"
    
    
    Global $iIndex = 0, $sListData2 = "C:\Users\joesoef pc\Desktop\autoit\twitter programma\lijsten\list2.txt"
    Global $sListFile2 = "C:\Users\joesoef pc\Desktop\autoit\twitter programma\lijsten\list2.txt"
    
    
    Global $iIndex = 0, $sListData3 = "C:\Users\joesoef pc\Desktop\autoit\twitter programma\lijsten\list3.txt"
    Global $sListFile3 = "C:\Users\joesoef pc\Desktop\autoit\twitter programma\lijsten\list3.txt"
    
    
    Global $iIndex = 0, $sListData4 = "C:\Users\joesoef pc\Desktop\autoit\twitter programma\lijsten\list4.txt"
    Global $sListFile4 = "C:\Users\joesoef pc\Desktop\autoit\twitter programma\lijsten\list4.txt"
    
    
    Global $iIndex = 0, $sListData5 = "C:\Users\joesoef pc\Desktop\autoit\twitter programma\lijsten\list5.txt"
    Global $sListFile5 = "C:\Users\joesoef pc\Desktop\autoit\twitter programma\lijsten\list5.txt"
    
    
    Global $iIndex = 0, $sListData6 = "C:\Users\joesoef pc\Desktop\autoit\twitter programma\lijsten\list6.txt"
    Global $sListFile6 = "C:\Users\joesoef pc\Desktop\autoit\twitter programma\lijsten\list6.txt"
    
    
    Global $iIndex = 0, $sListData7 = "C:\Users\joesoef pc\Desktop\autoit\twitter programma\lijsten\list7.txt"
    Global $sListFile7 = "C:\Users\joesoef pc\Desktop\autoit\twitter programma\lijsten\list7.txt"
    
    
    Global $iIndex = 0, $sListData8 = "C:\Users\joesoef pc\Desktop\autoit\twitter programma\lijsten\list8.txt"
    Global $sListFile8 = "C:\Users\joesoef pc\Desktop\autoit\twitter programma\lijsten\list8.txt"
    
    
    Global $iIndex = 0, $sListData9 = "C:\Users\joesoef pc\Desktop\autoit\twitter programma\lijsten\list9.txt"
    Global $sListFile9 = "C:\Users\joesoef pc\Desktop\autoit\twitter programma\lijsten\list9.txt"
    
    
    Global $iIndex = 0, $sListData10 = "C:\Users\joesoef pc\Desktop\autoit\twitter programma\lijsten\list10.txt"
    Global $sListFile10 = "C:\Users\joesoef pc\Desktop\autoit\twitter programma\lijsten\list10.txt"
    
    
    Global $iIndex = 0, $sListData11 = "C:\Users\joesoef pc\Desktop\autoit\twitter programma\lijsten\list11.txt"
    Global $sListFile11 = "C:\Users\joesoef pc\Desktop\autoit\twitter programma\lijsten\list11.txt"
    
    
    Global $iIndex = 0, $sListData12 = "C:\Users\joesoef pc\Desktop\autoit\twitter programma\lijsten\list12.txt"
    Global $sListFile12 = "C:\Users\joesoef pc\Desktop\autoit\twitter programma\lijsten\list12.txt"
    
    
    Global $iIndex = 0, $sListData13 = "C:\Users\joesoef pc\Desktop\autoit\twitter programma\lijsten\list13.txt"
    Global $sListFile13 = "C:\Users\joesoef pc\Desktop\autoit\twitter programma\lijsten\list13.txt"
    
    
    ; Read saved file if it exists--------
    If FileExists($sListFile1) Then
        $sListData1 = FileRead($sListFile1)
    EndIf
    
    
    ; Load data read from the file
    GUICtrlSetData($List1, $sListData1)
    _GUICtrlListBox_SetCurSel($List1, $iIndex)
    
    
    ; Read saved file if it exists--------
    If FileExists($sListFile2) Then
        $sListData2 = FileRead($sListFile2)
    EndIf
    
    
    ; Load data read from the file
    GUICtrlSetData($List2, $sListData2)
    _GUICtrlListBox_SetCurSel($List2, $iIndex)
    
    
    ; Read saved file if it exists--------
    If FileExists($sListFile3) Then
        $sListData3 = FileRead($sListFile3)
    EndIf
    
    
    ; Load data read from the file
    GUICtrlSetData($List3, $sListData3)
    _GUICtrlListBox_SetCurSel($List3, $iIndex)
    
    
    ; Read saved file if it exists--------
    If FileExists($sListFile4) Then
        $sListData4 = FileRead($sListFile4)
    EndIf
    
    
    ; Load data read from the file
    GUICtrlSetData($List4, $sListData4)
    _GUICtrlListBox_SetCurSel($List4, $iIndex)
    
    
    ; Read saved file if it exists--------
    If FileExists($sListFile5) Then
        $sListData5 = FileRead($sListFile5)
    EndIf
    
    
    ; Load data read from the file
    GUICtrlSetData($List5, $sListData5)
    _GUICtrlListBox_SetCurSel($List5, $iIndex)
    
    
    ; Read saved file if it exists--------
    If FileExists($sListFile6) Then
        $sListData6 = FileRead($sListFile6)
    EndIf
    
    
    ; Load data read from the file
    GUICtrlSetData($List6, $sListData6)
    _GUICtrlListBox_SetCurSel($List6, $iIndex)
    
    
    ; Read saved file if it exists--------
    If FileExists($sListFile7) Then
        $sListData7 = FileRead($sListFile7)
    EndIf
    
    
    ; Load data read from the file
    GUICtrlSetData($List7, $sListData7)
    _GUICtrlListBox_SetCurSel($List7, $iIndex)
    
    
    ; Read saved file if it exists--------
    If FileExists($sListFile8) Then
        $sListData8 = FileRead($sListFile8)
    EndIf
    
    
    ; Load data read from the file
    GUICtrlSetData($List8, $sListData8)
    _GUICtrlListBox_SetCurSel($List8, $iIndex)
    
    
    ; Read saved file if it exists--------
    If FileExists($sListFile9) Then
        $sListData9 = FileRead($sListFile9)
    EndIf
    
    
    ; Load data read from the file
    GUICtrlSetData($List9, $sListData9)
    _GUICtrlListBox_SetCurSel($List9, $iIndex)
    
    
    ; Read saved file if it exists--------
    If FileExists($sListFile10) Then
        $sListData10 = FileRead($sListFile10)
    EndIf
    Alles anzeigen

    What im tryind to do is to load the filles 'C:\Users\joesoef pc\Desktop\autoit\programma\lijsten\lijsten2\variablemap\list1.txt'

    so when it starts up it doens't automaticly only opens :"C:\Users\joesoef pc\Desktop\autoit\programma\lijsten\list8.txt" like in the old script (above second script)

    so before it loads I go to $mFiles the $mFiles DOES shown all the file in the lijsten2 map then I click on map for example: map august, it says : Clicked = August

    just like you coded for me then it shows a message with the directory, but then it doesnt load the content I clicked.

    I realy dont know what I am doing wrong??

  • Schaffung eines "openfile"

    • viper93
    • 27. Oktober 2014 um 22:18

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

    Code
    $sPath = @desktopdir & '\autoit\twitter programma\lijsten\lijsten2\'
    $hSearch = FileFindFirstFile($sPath & '*.*')
    
    
    local $mFiles = guictrlcreatemenu('&File')
    
    
    local $List_Start = guictrlcreatedummy() + 1
    While True
            $sFile = FileFindNextFile($hSearch)
            If @error Then ExitLoop
            GUICtrlCreateMenuItem($sFile, $mFiles)
    WEnd
    local $List_End = guictrlcreatedummy() - 1
    
    
    GUISetState()
    
    
    local $iMSG
    while 1
        $iMSG = guigetmsg()
        switch $iMSG
            case $gui_event_close
                Exit
            case $List_Start to $List_End
                ConsoleWrite('Clicked = ' & guictrlread($iMSG,1) & @CRLF)
    
    
    $list1 = ("\list1.txt")
    $list2 = ("\list2.txt")
    $list3 = ("\list3.txt")
    $list4 = ("\list4.txt")
    $list5 = ("\list5.txt")
    $list6 = ("\list6.txt")
    $list7 = ("\list7.txt")
    $list8 = ("\list8.txt")
    $list9 = ("\list9.txt")
    $list10 = ("\list10.txt")
    $list11 = ("\list11.txt")
    $list12 =  ("\list12.txt")
    $list13 = ("\list13.txt")
    $opgeslagen = @desktopdir & 'C:\Users\joesoef pc\Desktop\autoit\programma\lijsten\lijsten2\'
    $laden = guictrlread($iMSG,1) & @CRLF
    
    
                MsgBox(1,"file:","" & $opgeslagen & $laden & $list1)
    
    
    Global $iIndex = 0, $sListData1 = ($opgeslagen & $laden & $list1)
    Global $sListFile1 = ($opgeslagen  & $laden & $list1)
    
    
    Global $iIndex = 0, $sListData2 = ($opgeslagen & $laden & $list2)
    Global $sListFile2 = ($opgeslagen & $laden & $list2)
    
    
    Global $iIndex = 0, $sListData3 = ($opgeslagen & $laden & $list3)
    Global $sListFile3 = ($opgeslagen & $laden & $list3)
    
    
    Global $iIndex = 0, $sListData4 = ($opgeslagen & $laden & $list4)
    Global $sListFile4 = ($opgeslagen & $laden & $list4)
    
    
    Global $iIndex = 0, $sListData5 = ($opgeslagen & $laden & $list5)
    Global $sListFile5 = ($opgeslagen & $laden & $list4)
    
    
    Global $iIndex = 0, $sListData6 = ($opgeslagen & $laden & $list6)
    Global $sListFile6 = ($opgeslagen & $laden & $list6)
    
    
    Global $iIndex = 0, $sListData7 = ($opgeslagen & $laden & $list7)
    Global $sListFile7 = ($opgeslagen & $laden & $list7)
    
    
    Global $iIndex = 0, $sListData8 = ($opgeslagen & $laden & $list8)
    Global $sListFile8 = ($opgeslagen & $laden & $list8)
    
    
    Global $iIndex = 0, $sListData9 = ($opgeslagen & $laden & $list9)
    Global $sListFile9 = ($opgeslagen & $laden & $list9)
    
    
    Global $iIndex = 0, $sListData10 = ($opgeslagen & $laden & $list10)
    Global $sListFile10 = ($opgeslagen & $laden & $list10)
    
    
    Global $iIndex = 0, $sListData11 = ($opgeslagen & $laden & $list11)
    Global $sListFile11 = ($opgeslagen & $laden & $list11)
    
    
    Global $iIndex = 0, $sListData12 = ($opgeslagen & $laden & $list12)
    Global $sListFile12 = ($opgeslagen & $laden & $list12)
    
    
    Global $iIndex = 0, $sListData13 = ($opgeslagen & $laden & $list13)
    Global $sListFile13 = ($opgeslagen & $laden & $list13)
    
    
    If FileExists($sListFile1) Then
        $sListData1 = FileRead($sListFile1)
    EndIf
    
    
    GUICtrlSetData($List1, $sListData1)
    _GUICtrlListBox_SetCurSel($List1, $iIndex)
    
    
    If FileExists($sListFile2) Then
        $sListData2 = FileRead($sListFile2)
    EndIf
    
    
    ; Load data read from the file
    GUICtrlSetData($List2, $sListData2)
    _GUICtrlListBox_SetCurSel($List2, $iIndex)
    
    
    ; Read saved file if it exists--------
    If FileExists($sListFile3) Then
        $sListData3 = FileRead($sListFile3)
    EndIf
    
    
    ; Load data read from the file
    GUICtrlSetData($List3, $sListData3)
    _GUICtrlListBox_SetCurSel($List3, $iIndex)
    
    
    ; Read saved file if it exists--------
    If FileExists($sListFile4) Then
        $sListData4 = FileRead($sListFile4)
    EndIf
    
    
    ; Load data read from the file
    GUICtrlSetData($List4, $sListData4)
    _GUICtrlListBox_SetCurSel($List4, $iIndex)
    
    
    ; Read saved file if it exists--------
    If FileExists($sListFile5) Then
        $sListData5 = FileRead($sListFile5)
    EndIf
    
    
    ; Load data read from the file
    GUICtrlSetData($List5, $sListData5)
    _GUICtrlListBox_SetCurSel($List5, $iIndex)
    
    
    ; Read saved file if it exists--------
    If FileExists($sListFile6) Then
        $sListData6 = FileRead($sListFile6)
    EndIf
    
    
    ; Load data read from the file
    GUICtrlSetData($List6, $sListData6)
    _GUICtrlListBox_SetCurSel($List6, $iIndex)
    
    
    ; Read saved file if it exists--------
    If FileExists($sListFile7) Then
        $sListData7 = FileRead($sListFile7)
    EndIf
    
    
    ; Load data read from the file
    GUICtrlSetData($List7, $sListData7)
    _GUICtrlListBox_SetCurSel($List7, $iIndex)
    
    
    ; Read saved file if it exists--------
    If FileExists($sListFile8) Then
        $sListData8 = FileRead($sListFile8)
    EndIf
    
    
    ; Load data read from the file
    GUICtrlSetData($List8, $sListData8)
    _GUICtrlListBox_SetCurSel($List8, $iIndex)
    
    
    ; Read saved file if it exists--------
    If FileExists($sListFile9) Then
        $sListData9 = FileRead($sListFile9)
    EndIf
    
    
    ; Load data read from the file
    GUICtrlSetData($List9, $sListData9)
    _GUICtrlListBox_SetCurSel($List9, $iIndex)
    
    
    ; Read saved file if it exists--------
    If FileExists($sListFile10) Then
        $sListData10 = FileRead($sListFile10)
    EndIf
    
    
        EndSwitch
    wend
    Alles anzeigen

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

    but I dont know why its not working.

  • Schaffung eines "openfile"

    • viper93
    • 26. Oktober 2014 um 18:27

    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"

  • Schaffung eines "openfile"

    • viper93
    • 26. Oktober 2014 um 17:28

    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:

    Code
    $sPath = "C:\Users\joesoef pc\Desktop\autoit\programma\lijsten\lijsten2\"
    $hSearch = FileFindFirstFile('*.*')
    
    
    ;~ $hGUI = GUICreate('')
    ;~   $idMenu = GUICtrlCreateMenu('Files')
        $idOpen = GUICtrlCreateMenu('Open34', $filemenu)
    
    
    While True
            $sFile = FileFindNextFile($hSearch)
            If @error Then ExitLoop
            GUICtrlCreateMenuItem($sFile, $idOpen)
        WEnd
    
    
    GUISetState()
    While GUIGetMsg() <> -3
    WEnd
    Alles anzeigen

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

  • Schaffung eines "openfile"

    • viper93
    • 26. Oktober 2014 um 15:52

    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

    Code
    #Region ### START Koda GUI section ### Form=
    $Form1_1_1_1 = GUICreate("program", 814, 713, 697, 101)
    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)
    
    
    GUICtrlCreateMenuItem("", $filemenu, 2) 
    
    
    #EndRegion ### END Koda GUI section ###
    Alles anzeigen

    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"

  • Schaffung eines "openfile"

    • viper93
    • 26. Oktober 2014 um 15:19

    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

  • Schaffung eines "openfile"

    • viper93
    • 26. Oktober 2014 um 15:07

    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"

  • Schaffung eines "openfile"

    • viper93
    • 26. Oktober 2014 um 14:38

    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

Spenden

Jeder Euro hilft uns, Euch zu helfen.

Download

AutoIt Tutorial
AutoIt Buch
Onlinehilfe
AutoIt Entwickler
  1. Datenschutzerklärung
  2. Impressum
  3. Shoutbox-Archiv
Community-Software: WoltLab Suite™