Jump to content
Sign in to follow this  
Wb-FreeKill

New Version problem

Recommended Posts

Wb-FreeKill

After the new GUI beta, some of my script aint working!

Ive made a picture as a button, so when you click it, it will open a homepage. After the new beta, when i run the script, it keep popping up the website forever?

While 1
       
       $msg = GuiGetMsg()
    
If $msg = $knap1 then
    RunWait(@ComSpec & ' /C explorer.exe http://www.ige.dk/', '', @SW_HIDE)
endif

Share this post


Link to post
Share on other sites
SlimShady

1. Post the whole script because what you just posted is obviously not working.

2. The syntax of the GUI functions have changed, yes.

Check the help file. The GUI functions are listed.

You can compare them with your script and manually edit them.

Share this post


Link to post
Share on other sites
Wb-FreeKill

1. Post the whole script because what you just posted is obviously not working.

2. The syntax of the GUI functions have changed, yes.

Check the help file. The GUI functions are listed.

You can compare them with your script and manually edit them.

1. - The script is over 700 lines, so that would be silly :idiot:

2. - Ill try to check what have changes...

Share this post


Link to post
Share on other sites
Wb-FreeKill

ahh, cant really find out what to change?

I would be glad if you could see whats wrong with it? when i click $knap1, i should open the website...

Share this post


Link to post
Share on other sites
SlimShady

I agree there should be a list with changes between versions.

I'll try to make a list.

This:

$button_1 = GUISetControl("button", "Button 1", 50, 20, 100, 40)

has changed to:

$button_1 = GUICtrlCreateButton("Button 1", 50, 20, 100, 40)

Most control create functions have changed this way.

GUIMsg -> GUIGetMsg (big change, check syntax)

GUIWrite and (the function that writes to ListBox) -> GUICtrlSetData("<controlID>", "<data>", "<default>")

GUIRead -> GUICtrlRead

GUISendMsg -> GUICtrlSendMsg

GUIRecvMsg -> GUICtrlRecvMsg

Check the help file! It really contains all the info!

Share this post


Link to post
Share on other sites
Wb-FreeKill

Its not really the answer :idiot:

About the button commands, the 2'nd control i wrote, is the one i the version i use now, and i use GUIctrlcreatebutton in my script as well.

But i need the command to open a website over internet.exe when i click the $knap1

What would that command be?

Thx for ur help!

Share this post


Link to post
Share on other sites
SlimShady

$website = "www.autoitscript.com"
While 1
   $msg = GUIGetMsg()
   Sleep(25)
   
   Select
      Case $msg = $knap1
        Run('explorer "' & $website & '"')
         
   EndSelect
   
WEnd

Edited by SlimShady

Share this post


Link to post
Share on other sites
jpm

You need to use iexplorer.exe and not explorer.exe.

As iexplorer.exe is not in the default path you need to put the full pathname :idiot:

Share this post


Link to post
Share on other sites
Wb-FreeKill

Ok at least the script is running now, but it still popping up windows!

here's the code thats the problem, or will you have me to upload my script?

$knap1 = GUICtrlCreatepic($c & "PC1.jpg", 30, 380, 343, 70)



$website = "http://www.ige.dk"

While 1
       
       $msg = GuiGetMsg()
    
If $msg = $knap1 then
    Run('explorer "' & $website & '"')
endif

The picture is a "button", and when you click it, it should open the website!

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.