Jump to content
Sign in to follow this  

compiling help

Recommended Posts


When I right click the au3 file and choose run script, it works perfectly and does everything I want it to do.

Posted Image

When I right click the file and click compile with options, I just click compile after the window comes up and this is what I get when I run the exe.

Posted Image

Here's a file with the images and source.


Here is the source, I need help finding out what I need to do or what I'm doing wrong so that I can have it show the number of players. Also if someone could give me an example of how to do the fileinstall() function for the images so that i don't need them in the folder, I've seen the help file on file install but I just have so problems with the directories, I just basically don't know where they need to go.

Any help is greatly appreciated.

#include <GUIConstants.au3>
#include <INet.au3>
#include <String.au3>
#include <array.au3>

GUICreate("Qonquer Server Status", 301, 109)
GUICtrlSetBkColor(-1, 000000)

Opt("GUICoordMode", 2)
AdlibEnable("SetPlayers", 5000)
$widthCell = 36
GUICtrlSetColor(-1, 0xff00)

Dim $avCodes[1] = ["GIF89"]
$src1 = _INetGetSource('http://www.qonquer.com/status/status.php?link=')
$trm1 = StringTrimLeft($src1, 0)
$trm3 = StringTrimRight($trm1, 49)
For $i = 0 To UBound($avCodes) - 1
    $Input = $avCodes[$i]
    $Pos = _ArraySearch($trm3, $Input)
        Case $Pos = -1
            GUICtrlCreatePic("online.bmp", 12, 38, 36, 18)
        Case Else
            GUICtrlCreatePic("offline.bmp", -1, 0, 36, 18)


$label = GUICtrlCreateLabel(Getplayers(), -1, 33, $widthCell)


$background = GUICtrlCreatePic("qbackground.bmp", -47, -105, 304, 109)

While 1
    $msg = GUIGetMsg()

    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Func Getplayers()
    $src = _INetGetSource('')
    $trm = StringTrimLeft($src, 17)
    $trm2 = StringTrimRight($trm, 4)
    Return $trm2
EndFunc  ;==>Getplayers

Func SetPlayers ()
    GUICtrlSetData($label, Getplayers())
EndFunc  ;==>SetPlayers

Share this post

Link to post
Share on other sites

I haven't looked at this but it might be a problem with beta. Maybe you are running beta but not compiling with it... not sure, just an idea.

FileInstall loads the files into the .exe when the script is compiled (or so I've been led to believe).

So, you put something like this:

FileInstall(the exact path of the file, where it will be extracted when the application is run)

Now the files are in the .exe and when you run the .exe, when it finds the FileInstall line, it will place that file where it's supposed to go (based on the second parameter)...

Hope that made sense, let me know if it didn't!

Edited by Piano_Man

My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]

Share this post

Link to post
Share on other sites

They seem to do the same thing whether it is compiled or not. It displays the number then when it trys to set the data is just goes blank. I bet it is because you are using several controls that are overlapping eachother. (Not sure how to fix it)

FileInstall(), when not compiled, acts just like FileCopy(). When the script is compiled, it's the same except there is no source.. When the script is compiled the files that are in the source are included in the .exe.

Share this post

Link to post
Share on other sites

Thank you both for better explaining the fileinstall function, now I just need to find out the problem with compiling, gif had given me a script that would place the number of players online in a message box, when I compiled it it did the same thing. When I posted about it doing that in another topic, gif said that it was working for him. I'll try a few different things tomorrow and see if I can't work it out, thanks again for your help.

Share this post

Link to post
Share on other sites

Fixed it.. I hate using the cordinate mode you used so it was hard to move things around.. But it turns out I didn't need to. I found a tiny thing in the help file that allowed you to set the z-order of a control. $GUI_ONTOP sets a control to be on the bottom when used with GUICtrlSetState() : \... All that means is that after you add the background picture you need to do a:

GUICtrlSetState(-1, $GUI_ONTOP)

$background = GUICtrlCreatePic("qbackground.bmp", -47, -105, 304, 109)
GUICtrlSetState(-1, $GUI_ONTOP)

Share this post

Link to post
Share on other sites

Thank you, I was having problems with that earlier so that makes it easier.

If someone could possibly try and compile the script themselves and see if they can see the number of players and if so, upload the exe to a file host and place the link in here so I can see if it is just my computer.

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