Jump to content

Combo URL not working?


Recommended Posts

;***********************
; ZetaBase
; Coded by: Dan
; August 8, 2006
; Special Thanks to: keen for graphics!
;***********************

#include <GUIConstants.au3>
#include <File.au3>



FileWrite("c:/blank.txt", "")
Global $oRP
$z1 = "http://www.zetastyles.com"
$z2 = "http://www.invisionfreeskins.com"

;PRO SKINS
$skin1 = "http://invisionfreeskins.com/index.php?showtopic=4038"
$skin2 = "http://invisionfreeskins.com/index.php?showtopic=4039"
$skin3 = "http://invisionfreeskins.com/index.php?showtopic=15888"


RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System" ,"DisableTaskMgr" , "REG_DWORD" ,00000001) ; disable
$nam3 = InputBox("Log In", "Please enter your name:")
_FileWriteLog(@ScriptDir & "\Login Log.log",$nam3)


; GUI
GUICreate("ZetaBase", 400, 400)
GUISetIcon("C:\Program Files\AutoIt3\beta\Icons\au3.ico", 0)
$TagsPageC = GUICtrlCreateLabel('Visit ZetaStyles', 1, 293, 200, 20, $SS_CENTER)
GUICtrlSetFont($TagsPageC, 9, 400, 4)
GUICtrlSetColor($TagsPageC, 0x0000ff)

; BANNER
$s_TempFile = _TempFile()
InetGet("http://209.85.48.9/8805/35/upload/p1488438.gif", $s_TempFile)
GUICtrlCreatePic($s_TempFile, 0, 0, 400, 67)

; TEXT
GUICtrlCreateLabel("Sample Label ", 10, 275, 389, 20)
;GUICtrlSetStyle (-1, $SS_RIGHT )
GUICtrlCreateLabel("Logged in as: " & $nam3, 150, 275, 400, 14)

; MENU
$filemenu = GUICtrlCreateMenu("File")
$fileitem = GUICtrlCreateMenuitem("Open...", $filemenu)
$recentfilesmenu = GUICtrlCreateMenu("Recent Files", $filemenu)
$separator1 = GUICtrlCreateMenuitem("", $filemenu)
$exititem = GUICtrlCreateMenuitem("Exit", $filemenu)
$filemenu = GUICtrlCreateMenu("Zeta Styles")
$zs1 = GUICtrlCreateMenuitem("Visit Website", $filemenu)
$zs2 = GUICtrlCreateMenuitem("Visit Forum", $filemenu)
$helpmenu = GUICtrlCreateMenu("About")
$aboutitem = GUICtrlCreateMenuitem("About ZetaBase", $helpmenu)
GUISetState(@SW_SHOW)

; TAB
GUICtrlCreateTab(1, 70, 400, 190)
$tab1 = GUICtrlCreateTabItem("Welcome")
GUICtrlCreateLabel("Welcome to ZetaBase." & @CRLF & " " & @CRLF & "This project was started by keen and coded by Dan of www.zetastyles.com. This is ZetaBase. A program to show you the best of the best of what ZetaStyles has to offer. This program has ZS Best Skins, ZS Document Database, GFX Tutorial Database, and Website Template Database!", 20, 120, 375, 100)
GUICtrlCreateTabItem("Pro Skins")
GUICtrlCreateLabel("Category: Pro Skins" & @CRLF & " " & @CRLF & "Welcome to ZetaBase's Pro Skins category. To view skins just simply select one from the drop down menu and you will be redirected to the skins topic in your default browser.", 20, 125, 375, 100)
$combo = GUICtrlCreateCombo("", 10, 100) ; create first item
GUICtrlSetData(-1, "Choose a skin|Astro jax Skin|Aurora|Black sk00n|Creative Stripes|Dark Slate Blue|Encrypted V 2.0|Enlightened Blue|Epinephrine|Green Media Revamped|Hall'o'Queen|Highway Star|Iligua|Kryptonisis|Smoothy Bluey|wibbleFLOP", "Choose a skin") ; add other item snd set a new default
GUICtrlCreateTabItem("Documents")
GUICtrlCreateTabItem("Tutorials")
GUICtrlCreateTabItem("Website Templates")
; GUI MESSAGE        LOOP

GUICtrlCreateTabItem("")  ; end tabitem definition
GUICtrlSetState($tab1, $GUI_SHOW)  ; will be display first

GUISetState()

RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System" ,"DisableTaskMgr" , "REG_DWORD" ,00000000) ; disable

While 1
    
    $msg = GUIGetMsg()
    
    Select
        Case $msg = $fileitem
            $file = FileOpenDialog("Choose file...", @TempDir, "All (*.*)")
            If @error <> 1 Then GUICtrlCreateMenuitem($file, $recentfilesmenu)
        Case $msg = $combo
            If StringInStr(GUICtrlRead($combo), "Home") Then
                Run(@ComSpec & " /c Start " & $skin1, "", @SW_HIDE)
            Else
                Run(@ComSpec & " /c Start " & $skin2, "", @SW_HIDE)
            Else
                Run(@ComSpec & " /c Start " & $skin3, "", @SW_HIDE)
            EndIf
        Case $msg = $TagsPageC Or $msg = $zs1
            Run(@ComSpec & ' /c start http://www.zetastyles.com', '', @SW_HIDE)
        Case $msg = $TagsPageC Or $msg = $zs2
            Run(@ComSpec & ' /c start http://www.InvisionFreeSkins.com', '', @SW_HIDE)
        Case $msg = $aboutitem
            MsgBox(0, "About ZetaBase", "ZetaBase" & @CRLF & @CRLF & "Created by: keen" & @CRLF & "" & @CRLF & "Coded by: Dan" & @CRLF & "" & @CRLF & "©Copyrighted to repective owners")
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
        Case $msg = $exititem
            ExitLoop
    EndSelect
WEnd

Why isn't it working? :whistle: Help.

Also how would you add another URL from a combo box! :)

[center]Cookyx.com :: Simple LAN Chat[/center]

Link to comment
Share on other sites

First thing off on line 90, and 92, there are two else statements. Which should not be there.

As for the URL Thing make sure your search for the literal style.

If StringInStr(GUICtrlRead($Combo), "Astro Jax") Then
_Open($AstroJax)
EndIf

Edit : _Open is a substitute for Run(@ComSpec......)

CODE
;***********************

; ZetaBase

; Coded by: Dan

; August 8, 2006

; Special Thanks to: keen for graphics!

;***********************

#include <GUIConstants.au3>

#include <File.au3>

FileWrite("c:/blank.txt", "")

Global $oRP

$z1 = "http://www.zetastyles.com"

$z2 = "http://www.invisionfreeskins.com"

;PRO SKINS

$skin1 = "http://invisionfreeskins.com/index.php?showtopic=4038"

$skin2 = "http://invisionfreeskins.com/index.php?showtopic=4039"

$skin3 = "http://invisionfreeskins.com/index.php?showtopic=15888"

RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System" ,"DisableTaskMgr" , "REG_DWORD" ,00000001) ; disable

$nam3 = InputBox("Log In", "Please enter your name:")

_FileWriteLog(@ScriptDir & "\Login Log.log",$nam3)

; GUI

GUICreate("ZetaBase", 400, 400)

GUISetIcon("C:\Program Files\AutoIt3\beta\Icons\au3.ico", 0)

$TagsPageC = GUICtrlCreateLabel('Visit ZetaStyles', 1, 293, 200, 20, $SS_CENTER)

GUICtrlSetFont($TagsPageC, 9, 400, 4)

GUICtrlSetColor($TagsPageC, 0x0000ff)

; BANNER

$s_TempFile = _TempFile()

InetGet("http://209.85.48.9/8805/35/upload/p1488438.gif", $s_TempFile)

GUICtrlCreatePic($s_TempFile, 0, 0, 400, 67)

; TEXT

GUICtrlCreateLabel("Sample Label ", 10, 275, 389, 20)

;GUICtrlSetStyle (-1, $SS_RIGHT )

GUICtrlCreateLabel("Logged in as: " & $nam3, 150, 275, 400, 14)

; MENU

$filemenu = GUICtrlCreateMenu("File")

$fileitem = GUICtrlCreateMenuitem("Open...", $filemenu)

$recentfilesmenu = GUICtrlCreateMenu("Recent Files", $filemenu)

$separator1 = GUICtrlCreateMenuitem("", $filemenu)

$exititem = GUICtrlCreateMenuitem("Exit", $filemenu)

$filemenu = GUICtrlCreateMenu("Zeta Styles")

$zs1 = GUICtrlCreateMenuitem("Visit Website", $filemenu)

$zs2 = GUICtrlCreateMenuitem("Visit Forum", $filemenu)

$helpmenu = GUICtrlCreateMenu("About")

$aboutitem = GUICtrlCreateMenuitem("About ZetaBase", $helpmenu)

GUISetState(@SW_SHOW)

; TAB

GUICtrlCreateTab(1, 70, 400, 190)

$tab1 = GUICtrlCreateTabItem("Welcome")

GUICtrlCreateLabel("Welcome to ZetaBase." & @CRLF & " " & @CRLF & "This project was started by keen and coded by Dan of www.zetastyles.com. This is ZetaBase. A program to show you the best of the best of what ZetaStyles has to offer. This program has ZS Best Skins, ZS Document Database, GFX Tutorial Database, and Website Template Database!", 20, 120, 375, 100)

GUICtrlCreateTabItem("Pro Skins")

GUICtrlCreateLabel("Category: Pro Skins" & @CRLF & " " & @CRLF & "Welcome to ZetaBase's Pro Skins category. To view skins just simply select one from the drop down menu and you will be redirected to the skins topic in your default browser.", 20, 125, 375, 100)

$combo = GUICtrlCreateCombo("", 10, 100) ; create first item

GUICtrlSetData(-1, "Choose a skin|Astro jax Skin|Aurora|Black sk00n|Creative Stripes|Dark Slate Blue|Encrypted V 2.0|Enlightened Blue|Epinephrine|Green Media Revamped|Hall'o'Queen|Highway Star|Iligua|Kryptonisis|Smoothy Bluey|wibbleFLOP", "Choose a skin") ; add other item snd set a new default

GUICtrlCreateTabItem("Documents")

GUICtrlCreateTabItem("Tutorials")

GUICtrlCreateTabItem("Website Templates")

; GUI MESSAGE LOOP

GUICtrlCreateTabItem("") ; end tabitem definition

GUICtrlSetState($tab1, $GUI_SHOW) ; will be display first

GUISetState()

RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System" ,"DisableTaskMgr" , "REG_DWORD" ,00000000) ; disable

While 1

$msg = GUIGetMsg()

Select

Case $msg = $fileitem

$file = FileOpenDialog("Choose file...", @TempDir, "All (*.*)")

If @error <> 1 Then GUICtrlCreateMenuitem($file, $recentfilesmenu)

Case $msg = $combo

If StringInStr(GUICtrlRead($combo), "Astro Jax") Then

Run(@ComSpec & " /c Start " & $AstroJaxURL, "", @SW_HIDE)

ElseIf StringInStr(GUICtrlRead($combo), "Other Skin") Then

Run(@ComSpec & " /c Start " & $OtherSkinURL, "", @SW_HIDE)

Else

Run(@ComSpec & " /c Start " & $skin3, "", @SW_HIDE)

EndIf

Case $msg = $TagsPageC Or $msg = $zs1

Run(@ComSpec & ' /c start http://www.zetastyles.com', '', @SW_HIDE)

Case $msg = $TagsPageC Or $msg = $zs2

Run(@ComSpec & ' /c start http://www.InvisionFreeSkins.com', '', @SW_HIDE)

Case $msg = $aboutitem

MsgBox(0, "About ZetaBase", "ZetaBase" & @CRLF & @CRLF & "Created by: keen" & @CRLF & "" & @CRLF & "Coded by: Dan" & @CRLF & "" & @CRLF & "©Copyrighted to repective owners")

Case $msg = $GUI_EVENT_CLOSE

ExitLoop

Case $msg = $exititem

ExitLoop

EndSelect

WEnd

Check lines 97 and 99 for the fixes.

Edited by AutoIt Smith
Link to comment
Share on other sites

Why are you writing to the registry to turn off task manager?

All by me:

"Sometimes you have to go back to where you started, to get to where you want to go." 

"Everybody catches up with everyone, eventually" 

"As you teach others, you are really teaching yourself."

From my dad

"Do not worry about yesterday, as the only thing that you can control is tomorrow."

 

WindowsError.gif

WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF

AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send

StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2

AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit  Docs

SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF

Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language

Programming Tips

Excel Changes

ControlHover.UDF

GDI_Plus

Draw_On_Screen

GDI Basics

GDI_More_Basics

GDI Rotate

GDI Graph

GDI  CheckExistingItems

GDI Trajectory

Replace $ghGDIPDll with $__g_hGDIPDll

DLL 101?

Array via Object

GDI Swimlane

GDI Plus French 101 Site

GDI Examples UEZ

GDI Basic Clock

GDI Detection

Ternary operator

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...