Jump to content

Auto Website v1.1


z0mgItsJohn
 Share

Recommended Posts

Hello AutoIt Team I Have Updated Auto Website v1.1 So Now There Is Only One Script Added Setup To The Main Function.. :)

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

^_^~~ Auto Website Version 1.1 By John O. ~~:)

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

#Include <GuiConstants.au3>
#NoTrayIcon
Opt('GUIOnEventMode', 1)

$Name = " Auto Website v1.1"

Global $Ini = @ScriptDir & "\Website_Set.ini"
   
GuiCreate($Name & " - Website Set", 350, 320)
GUISetOnEvent($GUI_EVENT_CLOSE, '_Exit')
Dim $array[11]
For $X = 1 to 10
    $array[$X] = GUICtrlCreateInput ( "", 90, $x * 25, 200, 20)
    GUICtrlCreateLabel ( "Website " & $X & " =" , 15, ($X * 25) + 3)
Next
GuiCtrlCreateButton("Continue", 150,285,65,25)
GUICtrlSetOnEvent(-1, 'Continue')
GuiSetState(@SW_SHOW)

_LoadIni()

While 1
    Sleep(100)
WEnd

Func _LoadIni()
    If FileExists($Ini) Then
        Dim $IRSN = IniReadSectionNames($Ini)
        If Not @error Then
            For $i = 1 To $IRSN[0]
                Dim $IRS = IniReadSection($Ini, $IRSN[$i])
                For $h = 1 To $IRS[0][0]
                    If Not @error = 1 Then GUICtrlSetData($array[$i], $IRS[$h][1])
                Next
            Next
        EndIf     
    EndIf
EndFunc

Func Continue()
    For $X = 1 to 10
        IniWrite ($Ini, "Website_" & $X,"Set_" & $X, GuiCtrlRead($array[$X]))
    Next
WinSetState ( " "," ",(@SW_HIDE))
AutoWebsite()
EndFunc


Func AutoWebsite()
GuiCreate($Name, 200, 243)
Dim $array[11]
Local $bX = 15, $bY = 12
For $x = 1 To 10
    GUICtrlCreateGroup ("", $bx - 5, $bY - 10, 85, 45)
    $array[$x] = GUICtrlCreateButton ("Website " & $x, $bX , $bY, 75, 30)
    GUICtrlSetOnEvent(-1, "Website")
    GUICtrlSetTip(-1, IniRead("Website_Set.ini", "Website_" & $x, "Set_" & $x, ""))
    $bX += 96
    If Not Mod($x, 2) Then
        $bX = 15
        $bY += 47
    EndIf
Next
GUISetOnEvent($GUI_EVENT_CLOSE, '_Exit')
GuiSetState(@SW_SHOW)
EndFunc

While 1
    Sleep(100)
WEnd

Func Website()
    For $x = 1 To 10
        If @GUI_CtrlId = $array[$x] Then ShellExecute(IniRead("Website_Set.ini", "Website_" & $x, "Set_" & $x, ""))
    Next
EndFunc

Func _Exit()
    Exit
EndFunc

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

;)~~ Special Thanks To Smashly ~~;) ------------------ ~~ Enjoy ~~

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Edited by John2006

Latest Projects :- New & Improved TCP Chat

Link to comment
Share on other sites

To make it into one script, try this.

[pseudocode]

Checks to see if file "config.cfg" exists

if it doesn't exist, create it, open a configuration dialog where the options can be set

write that to a config.cfg file

if the file already exists, continue to the main code

[some main code here]

[/psuedocode]

So the file only exists if the person has ran the program before.

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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