Jump to content

Recommended Posts

Posted

If i want to use #include for making my script easier to edit, it can't load the file.

Here is my script:

#include <C:\Backup\Bots\WIFI-S\Sources\Scripts\Text>

;#Region ### START Koda GUI section ### Form=c:\backup\bots\bronnen\koda\wifi-s\wifi-s.kxf ;---------------Startcherm (this is in the other file i want to open)
;global $Start = GUICreate("WIFI-S ©", 679, 269, -1, -1)
;GUISetBkColor(0xFFFFFF)
;global $StartButton = GUICtrlCreateButton("Start", 400, 184, 163, 41)
;GUICtrlSetTip( -1, "Los het internet probleem op")
;GUICtrlSetFont(-1, 11, 400, 0, "Segoe UI")
;GUICtrlSetCursor (-1, 0)
;global $Logo = GUICtrlCreatePic("C:\Backup\Bots\WIFI-S\Sources\Afbeeldingen\Bijna overal\Logo Wifi-S.jpg", 8, 8, 132, 132)
;GUICtrlSetTip( -1, "Dit is het logo van WIFI-S")
;global $Tekst = GUICtrlCreateLabel("Welkom bij de WIFI-Solver", 136, 32, 507, 60)
;GUICtrlSetFont(-1, 40, 800, 0, "Segoe MDL2 Assets")
;GUICtrlSetColor(-1, 0x000000)
;global $History = GUICtrlCreateButton("Geschiedenis", 112, 184, 163, 41)
;GUICtrlSetTip( -1, "Kijk naar welke problemen je het meest hebben getroffen")
;GUICtrlSetFont(-1, 11, 400, 0, "Segoe UI")
;GUICtrlSetCursor (-1, 0)
;global $teks = GUICtrlCreateLabel("Als je problemen hebt geef het dan alsjeblieft door. Dit is nog een Béta.", 160, 104, 480, 24)
;GUICtrlSetFont(-1, 11, 400, 0, "Segoe UI")
;Dim $Start_AccelTable[2][2] = [["s", $StartButton],["g", $History]]
;GUISetAccelerators($Start_AccelTable)
;GUISetState(@SW_SHOW)
;#EndRegion ### END Koda GUI section ###

;While 1
;   $nMsg = GUIGetMsg()
;   Switch $nMsg
;       Case $GUI_EVENT_CLOSE
;        Case $StartButton
;           Start()
;   EndSwitch
;WEnd

Func Start() ;-------------------------------------------------------------------------------------------------------------Stap 1
GUISetState(@SW_HIDE, $Start) ;Zorg ervoor dat vensters verschijnen en verdwijnen(Nog bezig met maken)
#Region ### START Koda GUI section ### Form=c:\backup\bots\bronnen\koda\wifi-s\stap 1.kxf
Global $Stap1 = GUICreate("Stap 1 - Wifi-S ©", 732, 240, -1, -1)
GUISetFont(9, 400, 0, "Segoe UI")
GUISetBkColor(0xFFFFFF)
global $Home = GUICtrlCreateButton("Home", 8, 184, 40, 40, $BS_ICON)
GUICtrlSetCursor (-1, 0)
GUICtrlSetTip( -1, "Ga terug naar het beginscherm")
GUICtrlSetImage(-1, "C:\Backup\Bots\WIFI-S\Sources\Afbeeldingen\\Bijna overal\HomeKnop.ico", -1)
GUICtrlSetFont(-1, 11, 400, 0, "Segoe UI")
GUICtrlSetCursor (-1, 0)
global $Logo = GUICtrlCreatePic("C:\Backup\Bots\WIFI-S\Sources\Afbeeldingen\\Bijna overal\Logo Wifi-S.jpg", 8, 8, 132, 132)
GUICtrlSetTip( -1, "Dit is het logo van WIFI-S")
global $Stap = GUICtrlCreateLabel("Oplossing 1/20", 8, 128, 140, 29)
GUICtrlSetFont(-1, 14, 800, 0, "Segoe UI Semibold")
GUICtrlSetColor(-1, 0x000000)
global $Titel = GUICtrlCreateLabel("Probeer te herverbinden", 172, 32, 500, 55)
GUICtrlSetFont(-1, 32, 800, 0, "Arial")
GUICtrlSetColor(-1, 0x000000)
global $Uitleg1 = GUICtrlCreateLabel("Soms doet het internet het toch na eventjes wachten.", 208, 101, 353, 24)
GUICtrlSetFont(-1, 11, 400, 0, "Segoe UI")
global $Werkte = GUICtrlCreateButton("Dit werkte", 300, 192, 131, 33)
GUICtrlSetCursor (-1, 0)
GUICtrlSetTip( -1, "DIt heeft het probleem opgelost")
GUICtrlSetFont(-1, 10, 400, 0, "Segoe UI")
global $Volgende = GUICtrlCreateButton("Dit werkte niet", 544, 192, 131, 33)
GUICtrlSetCursor (-1, 0)
GUICtrlSetTip( -1, "Ik heb nog steeds internetproblemen")
GUICtrlSetFont(-1, 10, 400, 0, "Segoe UI")
global $Stap1_AccelTable[1][2] = [["+{BS}", $Home]]
GUISetAccelerators($Stap1_AccelTable)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
         Case $Home
            Home()
         Case $Volgende
            Stap2()
         Case $Werkte
            Werkte()
    EndSwitch
WEnd
EndFunc

Func Home() ;------------------Herstart programma.
   Run ("WIFI-S.exe")
   Exit
   EndFunc

Can you guys help me?

Posted
20 minutes ago, Silas said:

#include <C:\Backup\Bots\WIFI-S\Sources\Scripts\Text>

So you got a file with no extension, named "Text"?

If no then change to the file you wish to include, like:

#include "C:\Backup\Bots\WIFI-S\Sources\Scripts\Text\Functions.au3"

 

Posted

Sorry i think I made a mistake in my script, I meaned Test in stead of Text. It is a .exe file. I tried what you said in every way, but it still says that he can't open the file. But what do you mean with extension? Im new to AutoIt.

  • 2 weeks later...
Posted
On 13-10-2016 at 4:28 PM, l3ill said:

f you want to "#Include" a file then it has to be an .au3 file ( or .a3x ).

i tried #include ("C:\Backup\Bots\WIFI-S\Sources\Scripts\Testau3.au3") but the he says:

C:\Backup\Bots\WIFI-S\WIFI-S - Test.au3 (8) : ==> Cannot parse #include.: 
#include ("C:\Backup\Bots\WIFI-S\Sources\Scripts\Testau3.au3") 

Posted
16 hours ago, Silas said:

i tried #include ("C:\Backup\Bots\WIFI-S\Sources\Scripts\Testau3.au3") but the he says:

C:\Backup\Bots\WIFI-S\WIFI-S - Test.au3 (8) : ==> Cannot parse #include.: 
#include ("C:\Backup\Bots\WIFI-S\Sources\Scripts\Testau3.au3") 

if you wrote it just like you write it in the quote, then remove the parentheses

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...