Jump to content

Recommended Posts

Posted

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
Posted

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.

Posted

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

Posted

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!

Posted

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!

Posted (edited)

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

Edited by SlimShady
Posted

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:

Posted

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!

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
×
×
  • Create New...