Jump to content

Keep Getting Stuck


Skorm
 Share

Recommended Posts

I managed to make an application for a online radio station.

Now i'm pretty much done,

But the only thing is...

If i test it by pressing the F5 key, then it works perfect.

Great.

Then i build and/or compile it.

I open the .exe file i made.

But it doesn't start.

I see the AutoIt icon in my system tray.

it's there for a second or 2.

and then it goes away and nothing happens.

How can i fix this?

EDIT: Here is the code :)

; Real Hardstyle Radio Application
#include <GuiConstantsEx.au3>
#include <AVIConstants.au3>
#include <TreeViewConstants.au3>
#include<ie.au3>
#include<windowsconstants.au3>
#include<guiconstants.au3>
$oIE = _IECreateEmbedded ()

; Start Stream.
$url = "data\stream.asx"

$WMP = ObjCreate("WMPlayer.ocx")

With $WMP 
    ;.openPlayer($url) ;Unable to get $WMP.playState ()
    .URL = $url ;does not open WMPlayer.exe
EndWith
sleep (2000)
While $WMP.playState () = 3
$WMP.playState ())




Local $Button_1, $Button_2, $msg
    
    ; Het Frame
GuiCreate("Real Hardstyle Radio v.1.0 BETA", 582, 650)
GuiSetIcon("..\..\data\favicon.ico", 0)
GuiCtrlCreatePic("data\logo.gif",0,0, 582,73)
GuiCtrlSetColor(-1,0xffffff)
GuiCtrlCreatePic("data\hr.gif",0,75, 582, 1)
GuiCtrlCreatePic("data\hr.gif",0,545, 582,1)


; Afsluit Knop
$Button_1 = GUICtrlCreateButton("Close", 470, 550, 100)
$Button_2 = GUICtrlCreateButton("Visit Website", 10, 550, 100)

; Tekst
GuiCtrlCreateLabel("Real Hardstyle Radio", 245, 575, 300, 300)
GuiCtrlCreateLabel("Powered by Direct Web Solutions. licensed by Buma/Stemra and Sena,", 125, 590, 600, 300)
GuiCtrlCreateLabel("© copyright 2007 -2009 - Real Hardstyle Radio", 190, 605, 300, 300)
GuiCtrlCreateLabel("Application made by Skorm", 233, 620, 300, 300) 

; WEB Pagina1
    $GUIActiveX = GUICtrlCreateObj($oIE, 0, 77, 581, 460)
    
    
    
    ; HTML Script
    $sHTML = "<center> Press Visit Website </center>"
    _IENavigate($oIE, "about:blank")
    _IEDocWriteHTML ($oIE, $sHTML)
    _IEAction ($oIE, "refresh")
    
    
    
    
    ; Stop HTML Script

GUISetState()
    While 1
        $msg = GUIGetMsg()
        Switch $Msg
            Case $GUI_EVENT_CLOSE
            exit
            ExitLoop
        EndSwitch
    Select
    Case $msg = $GUI_EVENT_CLOSE

            ExitLoop
            Case $msg = $Button_1
            Exit    
            Case $msg = $Button_2
_IENavigate($oIE, "http://www.realhardstyleradio.nl/application/")
                EndSelect
    WEnd
    GUIDelete()
    Exit


GuiSetState()
While GuiGetMsg() <> $GUI_EVENT_CLOSE
WEnd
WEnd
Exit
$WMP.Close()

Thank you in Advance!

Skorm

Edited by Skorm
Link to comment
Share on other sites

Maybe that there was another way to save the file.

Anyway, i added the script to my first post.

Edit:

I installed autoit on my school swap.

it doesn't seem to work here aswell,

not even with F5 anymore

Edited by Skorm
Link to comment
Share on other sites

I get an error even when running it from SciTE.

Change line

$WMP.playState ())
to
$WMP.playState ()

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

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