Jump to content
Sign in to follow this  
Skorm

Keep Getting Stuck

Recommended Posts

Skorm

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

Share this post


Link to post
Share on other sites
dantay9

you will have to post the code for us to help you. So we can reproduce the problem.

Edited by dantay9

[font="Verdana"] [size="2"]"[/size][/font]Failure is not an option -- it comes packaged with Windows"[font="Verdana"][size="2"] Gecko Web Browser[/size][/font][font="Verdana"][size="2"], [/size][/font][font="Verdana"][size="2"]Yahtzee![/size][/font][font="Verdana"][size="2"], Toolbar Launcher (like RocketDock)[/size][/font][font="Verdana"][size="2"]Internet Blocker, Simple Calculator, Local Weather, Easy GDI+ GUI [/size][/font][font="Verdana"][size="2"]Triangle Solver, TCP File Transfer, [/size][/font][font="Verdana"][size="2"]Valuater's Autoit Wrappers[/size][/font][font="Verdana"][size="3"][size="2"][size="2"]OOP In AutoIt[/size][/size][/size][/font][font="Verdana"][size="2"][size="1"]Using Windows XP SP3, 1GB RAM, AMD Athlon Processor @ 2.1 GHzCheck me out at gadgets.freehostrocket.com[/size][/size][/font]

Share this post


Link to post
Share on other sites
Crash

Sorry to tell you this but if you don't attach the scripts, how are the debuggers supposed to know where the bug is?


JPGRARMouse Lock | My website | Thanks so much for your help! ❤️

Share this post


Link to post
Share on other sites
Skorm

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

Share this post


Link to post
Share on other sites
water

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 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
Skorm

I keep trying deleting some codes,

But then it either gives error's

or it still doesn't launch as it should be.

Anyone have some idea's ?

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.