Jump to content

GUICtrlSetState not working


Azu
 Share

Recommended Posts

It just flat out isn't working not sure why.. I did exactly what it said to do in the help file..

For example

$DA=GuiCtrlCreateInput($DARunPath, 26, 48, 280, 20)
GUICtrlSetState("10",$GUI_DROPACCEPTED)

Flat out doesn't work. I try to drag an item onto it, and it rejects it. Makes the circle with the line through it.

Edited by jpm
Link to comment
Share on other sites

I may be wrong but

GuiCtrlSetState($da,$GUI_DROPACCEPTED)

maybe?

~cdkid

AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide!
Link to comment
Share on other sites

Thanks for the quick replies

You mean make it like this?

$DA=GuiCtrlCreateInput($DARunPath, 26, 48, 280, 20, "", "$WS_EX_ACCEPTFILES")
GUICtrlSetState($DA,$GUI_DROPACCEPTED)

It still does the same thing o.o;

Link to comment
Share on other sites

Thanks for the quick replies

You mean make it like this?

$DA=GuiCtrlCreateInput($DARunPath, 26, 48, 280, 20, "", "$WS_EX_ACCEPTFILES")
GUICtrlSetState($DA,$GUI_DROPACCEPTED)

It still does the same thing o.o;

No

1 no quotes

2 not in the input control but the GuiCreate

3 -1 instead of quotes for default value in style if not changing style

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

  • Developers

Thanks for the quick replies

You mean make it like this?

$DA=GuiCtrlCreateInput($DARunPath, 26, 48, 280, 20, "", "$WS_EX_ACCEPTFILES")
GUICtrlSetState($DA,$GUI_DROPACCEPTED)

It still does the same thing o.o;

$WS_EX_ACCEPTFILES needs to be on the GUICreate() statement...

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

I spoke to soon D:

It lets me drag the file into the input box, but it doesn't do anything.. it's suppost to put in the path of the file isn't it..? :S

Show us the GUI code including the GUICreate()..... Edited by JdeB

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Func _Change()
GuiCreate("Auto Login Editer", 368, 66)
GuiSetIcon(@SystemDir & "\mspaint.exe", 0)
GuiCtrlCreateTab(1, 0, 368, 23)
GuiCtrlCreateTabItem("DA")
GuiCtrlCreateLabel("Username:", 0, 25)
$DARunName=IniRead($inipath, "DA", "Name", "")
$DAName=GuiCtrlCreateInput($DARunName, 51, 23, 130, 20)
GuiCtrlCreateLabel("Password:", 188, 25)
$DARunPassword=IniRead($inipath, "DA", "Password", "")
$DAPassword=GuiCtrlCreateInput($DARunPassword, 238, 23, 130, 20)
GuiCtrlCreateLabel("Path:", 0, 50)
$DARunPath=IniRead($inipath, "DA", "Path", "")
$DA=GuiCtrlCreateInput($DARunPath, 26, 48, 280, 20, -1, $WS_EX_ACCEPTFILES)
$BrowseDA=GuiCtrlCreateButton("Browse", 310, 48, 59, 20)
$DAWindow=GUICtrlCreateCheckbox ("Window", 257, 4, 53, 13)
GuiCtrlCreateTabItem("RO")
GuiCtrlCreateLabel("Username:", 0, 25)
$RORunName=IniRead($inipath, "RO", "Name", "")
$ROName=GuiCtrlCreateInput($RORunName, 51, 23, 130, 20)
GuiCtrlCreateLabel("Password:", 188, 25)
$RORunPassword=IniRead($inipath, "RO", "Password", "")
$ROPassword=GuiCtrlCreateInput($RORunPassword, 238, 23, 130, 20)
GuiCtrlCreateLabel("Path:", 0, 50)
$RORunPath=IniRead($inipath, "RO", "Path", "")
$RO=GuiCtrlCreateInput($RORunPath, 26, 48, 280, 20, -1, $WS_EX_ACCEPTFILES)
$BrowseRO=GuiCtrlCreateButton("Browse", 310, 48, 59, 20)
GuiCtrlCreateTabItem("WoW")
GuiCtrlCreateLabel("Username:", 0, 25)
$WoWRunName=IniRead($inipath, "WoW", "Name", "")
$WoWName=GuiCtrlCreateInput($WoWRunName, 51, 23, 130, 20)
GuiCtrlCreateLabel("Password:", 188, 25)
$WoWRunPassword=IniRead($inipath, "WoW", "Password", "")
$WoWPassword=GuiCtrlCreateInput($WoWRunPassword, 238, 23, 130, 20)
GuiCtrlCreateLabel("Path:", 0, 50)
$WoWRunPath=IniRead($inipath, "WoW", "Path", "")
$WoW=GuiCtrlCreateInput($WoWRunPath, 26, 48, 280, 20, -1, $WS_EX_ACCEPTFILES)
$BrowseWoW=GuiCtrlCreateButton("Browse", 310, 48, 59, 20)
GuiCtrlCreateTabItem("SC")
GuiCtrlCreateLabel("Username:", 0, 25)
$SCRunName=IniRead($inipath, "SC", "Name", "")
$SCName=GuiCtrlCreateInput($SCRunName, 51, 23, 130, 20)
GuiCtrlCreateLabel("Password:", 188, 25)
$SCRunPassword=IniRead($inipath, "SC", "Password", "")
$SCPassword=GuiCtrlCreateInput($SCRunPassword, 238, 23, 130, 20)
GuiCtrlCreateLabel("Path:", 0, 50)
$SCRunPath=IniRead($inipath, "SC", "Path", "")
$SC=GuiCtrlCreateInput($SCRunPath, 26, 48, 280, 20, -1, $WS_EX_ACCEPTFILES)
$BrowseSC=GuiCtrlCreateButton("Browse", 310, 48, 59, 20)
GuiCtrlCreateTabItem("Misc")
$Misc01=GuiCtrlCreateButton("1", 0, 25, 10, 18)
$Misc1=IniRead($inipath, "Misc", "1", "")
$Misc1=GuiCtrlCreateInput($Misc1, 10, 23, 155, 20, -1, $WS_EX_ACCEPTFILES)
$Misc02=GuiCtrlCreateButton("2", 182, 25, 10, 18)
$Misc2=IniRead($inipath, "Misc", "2", "")
$Misc2=GuiCtrlCreateInput($Misc2, 192, 23, 155, 20, -1, $WS_EX_ACCEPTFILES)
$Misc03=GuiCtrlCreateButton("3", 0, 50, 10, 18)
$Misc3=IniRead($inipath, "Misc", "3", "")
$Misc3=GuiCtrlCreateInput($Misc3, 10, 48, 155, 20, -1, $WS_EX_ACCEPTFILES)
$Misc04=GuiCtrlCreateButton("4", 182, 50, 10, 18)
$Misc4=IniRead($inipath, "Misc", "4", "")
$Misc4=GuiCtrlCreateInput($Misc4, 192, 48, 155, 20, -1, $WS_EX_ACCEPTFILES)
GUICtrlSetState(-1,$GUI_DROPACCEPTED)
GuiCtrlCreateTabItem("Binds")
GuiCtrlCreateTabItem("")
$Apply=GuiCtrlCreateButton("Apply", 310, 0, 59, 20)
GuiSetState()
Do
$msg=GUIGetMsg()
Select
Case $msg=$BrowseDA
GUICtrlSetData($DA, FileOpenDialog("Browse to DA", "", "Dark Ages (*.exe)","", "DA.exe"))
IniWrite($inipath, "DA", "Path", GUICtrlRead ($DA))
Case $msg=$DAWindow
IniWrite($inipath, "DA", "Windowed?", GUICtrlRead ($DAWindow))
Case $msg=$BrowseRO
GUICtrlSetData($RO, FileOpenDialog("Browse to RO", "", "Ragnarok Online (*.exe)","", "RO.exe"))
IniWrite($inipath, "RO", "Path", GUICtrlRead ($RO))
Case $msg=$BrowseWoW
GUICtrlSetData($WoW, FileOpenDialog("Browse to WoW", "", "World of Warcraft (*.exe)","", "WoW.exe.exe"))
IniWrite($inipath, "WoW", "Path", GUICtrlRead ($WoW))
Case $msg=$BrowseSC
GUICtrlSetData($SC, FileOpenDialog("Browse to SC", "", "Star Craft (*.exe)","", "SC.exe"))
IniWrite($inipath, "SC", "Path", GUICtrlRead ($SC))
Case $msg=$Misc01
GUICtrlSetData($Misc1, FileOpenDialog("Browse to misc file 1", "", "(*.exe)","", ""))
IniWrite($inipath, "Misc", "1", GUICtrlRead ($Misc1))
Case $msg=$Misc02
GUICtrlSetData($Misc2, FileOpenDialog("Browse to misc file 2", "", "(*.exe)","", ""))
IniWrite($inipath, "Misc", "2", GUICtrlRead ($Misc2))
Case $msg=$Misc03
GUICtrlSetData($Misc3, FileOpenDialog("Browse to misc file 3", "", "(*.exe)","", ""))
IniWrite($inipath, "Misc", "3", GUICtrlRead ($Misc3))
Case $msg=$Misc04
GUICtrlSetData($Misc4, FileOpenDialog("Browse to misc file 4", "", "(*.exe)","", ""))
IniWrite($inipath, "Misc", "4", GUICtrlRead ($Misc4))
Case $msg=$Apply
IniWrite($inipath, "DA", "Path", GUICtrlRead ($DA))
IniWrite($inipath, "DA", "Password", GUICtrlRead ($DAPassword))
IniWrite($inipath, "DA", "Name", GUICtrlRead ($DAName))
IniWrite($inipath, "RO", "Path", GUICtrlRead ($RO))
IniWrite($inipath, "RO", "Password", GUICtrlRead ($ROPassword))
IniWrite($inipath, "RO", "Name", GUICtrlRead ($ROName))
IniWrite($inipath, "WoW", "Path", GUICtrlRead ($WoW))
IniWrite($inipath, "WoW", "Password", GUICtrlRead ($WoWPassword))
IniWrite($inipath, "WoW", "Name", GUICtrlRead ($WoWName))
IniWrite($inipath, "SC", "Path", GUICtrlRead ($SC))
IniWrite($inipath, "SC", "Password", GUICtrlRead ($SCPassword))
IniWrite($inipath, "SC", "Name", GUICtrlRead ($SCName))
IniWrite($inipath, "Misc", "1", GUICtrlRead ($Misc1))
IniWrite($inipath, "Misc", "2", GUICtrlRead ($Misc2))
IniWrite($inipath, "Misc", "3", GUICtrlRead ($Misc3))
IniWrite($inipath, "Misc", "4", GUICtrlRead ($Misc4))
EndSelect

Link to comment
Share on other sites

  • Developers

No

1 no quotes

2 not in the input control but the GuiCreate

3 -1 instead of quotes for default value in style if not changing style

You didn't do ITEM 2 in gafrost's post..... GUICreate needs $WS_EX_ACCEPTFILES.

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Okay.. now I'm back to aquare one..

Func _Change()
GuiCreate("Auto Login Editer", 368, 66, -1, $WS_EX_ACCEPTFILES)
GuiSetIcon(@SystemDir & "\mspaint.exe", 0)
GuiCtrlCreateTab(1, 0, 368, 23)
GuiCtrlCreateTabItem("DA")
GuiCtrlCreateLabel("Username:", 0, 25)
$DARunName=IniRead($inipath, "DA", "Name", "")
$DAName=GuiCtrlCreateInput($DARunName, 51, 23, 130, 20)
GuiCtrlCreateLabel("Password:", 188, 25)
$DARunPassword=IniRead($inipath, "DA", "Password", "")
$DAPassword=GuiCtrlCreateInput($DARunPassword, 238, 23, 130, 20)
GuiCtrlCreateLabel("Path:", 0, 50)
$DARunPath=IniRead($inipath, "DA", "Path", "")
$DA=GuiCtrlCreateInput($DARunPath, 26, 48, 280, 20)
$BrowseDA=GuiCtrlCreateButton("Browse", 310, 48, 59, 20)
$DAWindow=GUICtrlCreateCheckbox ("Window", 257, 4, 53, 13)
GuiCtrlCreateTabItem("RO")
GuiCtrlCreateLabel("Username:", 0, 25)
$RORunName=IniRead($inipath, "RO", "Name", "")
$ROName=GuiCtrlCreateInput($RORunName, 51, 23, 130, 20)
GuiCtrlCreateLabel("Password:", 188, 25)
$RORunPassword=IniRead($inipath, "RO", "Password", "")
$ROPassword=GuiCtrlCreateInput($RORunPassword, 238, 23, 130, 20)
GuiCtrlCreateLabel("Path:", 0, 50)
$RORunPath=IniRead($inipath, "RO", "Path", "")
$RO=GuiCtrlCreateInput($RORunPath, 26, 48, 280, 20)
$BrowseRO=GuiCtrlCreateButton("Browse", 310, 48, 59, 20)
GuiCtrlCreateTabItem("WoW")
GuiCtrlCreateLabel("Username:", 0, 25)
$WoWRunName=IniRead($inipath, "WoW", "Name", "")
$WoWName=GuiCtrlCreateInput($WoWRunName, 51, 23, 130, 20)
GuiCtrlCreateLabel("Password:", 188, 25)
$WoWRunPassword=IniRead($inipath, "WoW", "Password", "")
$WoWPassword=GuiCtrlCreateInput($WoWRunPassword, 238, 23, 130, 20)
GuiCtrlCreateLabel("Path:", 0, 50)
$WoWRunPath=IniRead($inipath, "WoW", "Path", "")
$WoW=GuiCtrlCreateInput($WoWRunPath, 26, 48, 280, 20)
$BrowseWoW=GuiCtrlCreateButton("Browse", 310, 48, 59, 20)
GuiCtrlCreateTabItem("SC")
GuiCtrlCreateLabel("Username:", 0, 25)
$SCRunName=IniRead($inipath, "SC", "Name", "")
$SCName=GuiCtrlCreateInput($SCRunName, 51, 23, 130, 20)
GuiCtrlCreateLabel("Password:", 188, 25)
$SCRunPassword=IniRead($inipath, "SC", "Password", "")
$SCPassword=GuiCtrlCreateInput($SCRunPassword, 238, 23, 130, 20)
GuiCtrlCreateLabel("Path:", 0, 50)
$SCRunPath=IniRead($inipath, "SC", "Path", "")
$SC=GuiCtrlCreateInput($SCRunPath, 26, 48, 280, 20)
$BrowseSC=GuiCtrlCreateButton("Browse", 310, 48, 59, 20)
GuiCtrlCreateTabItem("Misc")
$Misc01=GuiCtrlCreateButton("1", 0, 25, 10, 18)
$Misc1=IniRead($inipath, "Misc", "1", "")
$Misc1=GuiCtrlCreateInput($Misc1, 10, 23, 155, 20)
$Misc02=GuiCtrlCreateButton("2", 182, 25, 10, 18)
$Misc2=IniRead($inipath, "Misc", "2", "")
$Misc2=GuiCtrlCreateInput($Misc2, 192, 23, 155, 20)
$Misc03=GuiCtrlCreateButton("3", 0, 50, 10, 18)
$Misc3=IniRead($inipath, "Misc", "3", "")
$Misc3=GuiCtrlCreateInput($Misc3, 10, 48, 155, 20)
$Misc04=GuiCtrlCreateButton("4", 182, 50, 10, 18)
$Misc4=IniRead($inipath, "Misc", "4", "")
$Misc4=GuiCtrlCreateInput($Misc4, 192, 48, 155, 20)
GUICtrlSetState(-1,$GUI_DROPACCEPTED)
GuiCtrlCreateTabItem("Binds")
GuiCtrlCreateTabItem("")
$Apply=GuiCtrlCreateButton("Apply", 310, 0, 59, 20)
GuiSetState()
Do
$msg=GUIGetMsg()
Select
Case $msg=$BrowseDA
GUICtrlSetData($DA, FileOpenDialog("Browse to DA", "", "Dark Ages (*.exe)","", "DA.exe"))
IniWrite($inipath, "DA", "Path", GUICtrlRead ($DA))
Case $msg=$DAWindow
IniWrite($inipath, "DA", "Windowed?", GUICtrlRead ($DAWindow))
Case $msg=$BrowseRO
GUICtrlSetData($RO, FileOpenDialog("Browse to RO", "", "Ragnarok Online (*.exe)","", "RO.exe"))
IniWrite($inipath, "RO", "Path", GUICtrlRead ($RO))
Case $msg=$BrowseWoW
GUICtrlSetData($WoW, FileOpenDialog("Browse to WoW", "", "World of Warcraft (*.exe)","", "WoW.exe.exe"))
IniWrite($inipath, "WoW", "Path", GUICtrlRead ($WoW))
Case $msg=$BrowseSC
GUICtrlSetData($SC, FileOpenDialog("Browse to SC", "", "Star Craft (*.exe)","", "SC.exe"))
IniWrite($inipath, "SC", "Path", GUICtrlRead ($SC))
Case $msg=$Misc01
GUICtrlSetData($Misc1, FileOpenDialog("Browse to misc file 1", "", "(*.exe)","", ""))
IniWrite($inipath, "Misc", "1", GUICtrlRead ($Misc1))
Case $msg=$Misc02
GUICtrlSetData($Misc2, FileOpenDialog("Browse to misc file 2", "", "(*.exe)","", ""))
IniWrite($inipath, "Misc", "2", GUICtrlRead ($Misc2))
Case $msg=$Misc03
GUICtrlSetData($Misc3, FileOpenDialog("Browse to misc file 3", "", "(*.exe)","", ""))
IniWrite($inipath, "Misc", "3", GUICtrlRead ($Misc3))
Case $msg=$Misc04
GUICtrlSetData($Misc4, FileOpenDialog("Browse to misc file 4", "", "(*.exe)","", ""))
IniWrite($inipath, "Misc", "4", GUICtrlRead ($Misc4))
Case $msg=$Apply
IniWrite($inipath, "DA", "Path", GUICtrlRead ($DA))
IniWrite($inipath, "DA", "Password", GUICtrlRead ($DAPassword))
IniWrite($inipath, "DA", "Name", GUICtrlRead ($DAName))
IniWrite($inipath, "RO", "Path", GUICtrlRead ($RO))
IniWrite($inipath, "RO", "Password", GUICtrlRead ($ROPassword))
IniWrite($inipath, "RO", "Name", GUICtrlRead ($ROName))
IniWrite($inipath, "WoW", "Path", GUICtrlRead ($WoW))
IniWrite($inipath, "WoW", "Password", GUICtrlRead ($WoWPassword))
IniWrite($inipath, "WoW", "Name", GUICtrlRead ($WoWName))
IniWrite($inipath, "SC", "Path", GUICtrlRead ($SC))
IniWrite($inipath, "SC", "Password", GUICtrlRead ($SCPassword))
IniWrite($inipath, "SC", "Name", GUICtrlRead ($SCName))
IniWrite($inipath, "Misc", "1", GUICtrlRead ($Misc1))
IniWrite($inipath, "Misc", "2", GUICtrlRead ($Misc2))
IniWrite($inipath, "Misc", "3", GUICtrlRead ($Misc3))
IniWrite($inipath, "Misc", "4", GUICtrlRead ($Misc4))
EndSelect
Until $msg=$GUI_EVENT_CLOSE
GuiDelete()
_Panel()
EndFunc
Link to comment
Share on other sites

  • Developers

EDIT: The GUICreate is still wrong:

Here is a working snippet:

#include<GUIConstants.au3>
GUICreate("Auto Login Editer", 368, 66, -1, -1,-1 ,$WS_EX_ACCEPTFILES)
$Misc4 = GUICtrlCreateInput("", 192, 48, 155, 20)
GUICtrlSetState(-1, $GUI_DROPACCEPTED)
GUISetState()
Do
    $msg = GUIGetMsg()
    Select
        Case $msg = $Misc4
            GUICtrlSetData($Misc4, FileOpenDialog("Browse to misc file 4", "", "(*.exe)", "", ""))
    EndSelect
Until $msg = $GUI_EVENT_CLOSE
GUIDelete()
Edited by JdeB

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Uhhh now it's really messed up.

When I drag something onto it, it doesn't put the path in, AND all of the fields are blank, it's suppost to read them from the ini and put them into there but now they are blank and it's still not working so it's even worse now what am I doing wrong???

Func _Change()
GUICreate("Auto Login Editer", 368, 66, -1, -1, -1,$WS_EX_ACCEPTFILES)
GuiSetIcon(@SystemDir & "\mspaint.exe", 0)
GuiCtrlCreateTab(1, 0, 368, 23)
GuiCtrlCreateTabItem("DA")
GuiCtrlCreateLabel("Username:", 0, 25)
$DARunName=IniRead($inipath, "DA", "Name", "")
$DAName=GuiCtrlCreateInput("", 51, 23, 130, 20)
GuiCtrlCreateLabel("Password:", 188, 25)
$DARunPassword=IniRead($inipath, "DA", "Password", "")
$DAPassword=GuiCtrlCreateInput("", 238, 23, 130, 20)
GuiCtrlCreateLabel("Path:", 0, 50)
$DARunPath=IniRead($inipath, "DA", "Path", "")
$DA=GuiCtrlCreateInput("", 26, 48, 280, 20)
$BrowseDA=GuiCtrlCreateButton("Browse", 310, 48, 59, 20)
$DAWindow=GUICtrlCreateCheckbox ("Window", 257, 4, 53, 13)
GuiCtrlCreateTabItem("RO")
GuiCtrlCreateLabel("Username:", 0, 25)
$RORunName=IniRead($inipath, "RO", "Name", "")
$ROName=GuiCtrlCreateInput("", 51, 23, 130, 20)
GuiCtrlCreateLabel("Password:", 188, 25)
$RORunPassword=IniRead($inipath, "RO", "Password", "")
$ROPassword=GuiCtrlCreateInput("", 238, 23, 130, 20)
GuiCtrlCreateLabel("Path:", 0, 50)
$RORunPath=IniRead($inipath, "RO", "Path", "")
$RO=GuiCtrlCreateInput("", 26, 48, 280, 20)
$BrowseRO=GuiCtrlCreateButton("Browse", 310, 48, 59, 20)
GuiCtrlCreateTabItem("WoW")
GuiCtrlCreateLabel("Username:", 0, 25)
$WoWRunName=IniRead($inipath, "WoW", "Name", "")
$WoWName=GuiCtrlCreateInput("", 51, 23, 130, 20)
GuiCtrlCreateLabel("Password:", 188, 25)
$WoWRunPassword=IniRead($inipath, "WoW", "Password", "")
$WoWPassword=GuiCtrlCreateInput("", 238, 23, 130, 20)
GuiCtrlCreateLabel("Path:", 0, 50)
$WoWRunPath=IniRead($inipath, "WoW", "Path", "")
$WoW=GuiCtrlCreateInput("", 26, 48, 280, 20)
$BrowseWoW=GuiCtrlCreateButton("Browse", 310, 48, 59, 20)
GuiCtrlCreateTabItem("SC")
GuiCtrlCreateLabel("Username:", 0, 25)
$SCRunName=IniRead($inipath, "SC", "Name", "")
$SCName=GuiCtrlCreateInput("", 51, 23, 130, 20)
GuiCtrlCreateLabel("Password:", 188, 25)
$SCRunPassword=IniRead($inipath, "SC", "Password", "")
$SCPassword=GuiCtrlCreateInput("", 238, 23, 130, 20)
GuiCtrlCreateLabel("Path:", 0, 50)
$SCRunPath=IniRead($inipath, "SC", "Path", "")
$SC=GuiCtrlCreateInput("", 26, 48, 280, 20)
$BrowseSC=GuiCtrlCreateButton("Browse", 310, 48, 59, 20)
GuiCtrlCreateTabItem("Misc")
$Misc01=GuiCtrlCreateButton("1", 0, 25, 10, 18)
$Misc1=IniRead($inipath, "Misc", "1", "")
$Misc1=GuiCtrlCreateInput("", 10, 23, 155, 20)
$Misc02=GuiCtrlCreateButton("2", 182, 25, 10, 18)
$Misc2=IniRead($inipath, "Misc", "2", "")
$Misc2=GuiCtrlCreateInput("", 192, 23, 155, 20)
$Misc03=GuiCtrlCreateButton("3", 0, 50, 10, 18)
$Misc3=IniRead($inipath, "Misc", "3", "")
$Misc3=GuiCtrlCreateInput("", 10, 48, 155, 20)
$Misc04=GuiCtrlCreateButton("4", 182, 50, 10, 18)
$Misc4=IniRead($inipath, "Misc", "4", "")
$Misc4=GuiCtrlCreateInput("", 192, 48, 155, 20)
GuiCtrlCreateTabItem("Binds")
GuiCtrlCreateTabItem("")
$Apply=GuiCtrlCreateButton("Apply", 310, 0, 59, 20)
GUICtrlSetState(-1, $GUI_DROPACCEPTED)
GUISetState()
Do
$msg=GUIGetMsg()
Select
Case $msg=$BrowseDA
GUICtrlSetData($DA, FileOpenDialog("Browse to DA", "", "Dark Ages (*.exe)","", "DA.exe"))
IniWrite($inipath, "DA", "Path", GUICtrlRead ($DA))
Case $msg=$DAWindow
IniWrite($inipath, "DA", "Windowed?", GUICtrlRead ($DAWindow))
Case $msg=$BrowseRO
GUICtrlSetData($RO, FileOpenDialog("Browse to RO", "", "Ragnarok Online (*.exe)","", "RO.exe"))
IniWrite($inipath, "RO", "Path", GUICtrlRead ($RO))
Case $msg=$BrowseWoW
GUICtrlSetData($WoW, FileOpenDialog("Browse to WoW", "", "World of Warcraft (*.exe)","", "WoW.exe.exe"))
IniWrite($inipath, "WoW", "Path", GUICtrlRead ($WoW))
Case $msg=$BrowseSC
GUICtrlSetData($SC, FileOpenDialog("Browse to SC", "", "Star Craft (*.exe)","", "SC.exe"))
IniWrite($inipath, "SC", "Path", GUICtrlRead ($SC))
Case $msg=$Misc01
GUICtrlSetData($Misc1, FileOpenDialog("Browse to misc file 1", "", "(*.exe)","", ""))
IniWrite($inipath, "Misc", "1", GUICtrlRead ($Misc1))
Case $msg=$Misc02
GUICtrlSetData($Misc2, FileOpenDialog("Browse to misc file 2", "", "(*.exe)","", ""))
IniWrite($inipath, "Misc", "2", GUICtrlRead ($Misc2))
Case $msg=$Misc03
GUICtrlSetData($Misc3, FileOpenDialog("Browse to misc file 3", "", "(*.exe)","", ""))
IniWrite($inipath, "Misc", "3", GUICtrlRead ($Misc3))
Case $msg=$Misc04
GUICtrlSetData($Misc4, FileOpenDialog("Browse to misc file 4", "", "(*.exe)", "", ""))
IniWrite($inipath, "Misc", "4", GUICtrlRead ($Misc4))
Case $msg=$Apply
IniWrite($inipath, "DA", "Path", GUICtrlRead ($DA))
IniWrite($inipath, "DA", "Password", GUICtrlRead ($DAPassword))
IniWrite($inipath, "DA", "Name", GUICtrlRead ($DAName))
IniWrite($inipath, "RO", "Path", GUICtrlRead ($RO))
IniWrite($inipath, "RO", "Password", GUICtrlRead ($ROPassword))
IniWrite($inipath, "RO", "Name", GUICtrlRead ($ROName))
IniWrite($inipath, "WoW", "Path", GUICtrlRead ($WoW))
IniWrite($inipath, "WoW", "Password", GUICtrlRead ($WoWPassword))
IniWrite($inipath, "WoW", "Name", GUICtrlRead ($WoWName))
IniWrite($inipath, "SC", "Path", GUICtrlRead ($SC))
IniWrite($inipath, "SC", "Password", GUICtrlRead ($SCPassword))
IniWrite($inipath, "SC", "Name", GUICtrlRead ($SCName))
IniWrite($inipath, "Misc", "1", GUICtrlRead ($Misc1))
IniWrite($inipath, "Misc", "2", GUICtrlRead ($Misc2))
IniWrite($inipath, "Misc", "3", GUICtrlRead ($Misc3))
IniWrite($inipath, "Misc", "4", GUICtrlRead ($Misc4))
EndSelect
Until $msg=$GUI_EVENT_CLOSE
GuiDelete()
_Panel()
EndFunc
Link to comment
Share on other sites

  • Moderators

4 post in the same thread within 43 minutes... that's a bit rediculous.

Oh now you deleted all of them!!

GUICtrlSetState(-1 <<< is the problem. you have it right after a button.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

#include<GUIConstants.au3>

GUICreate("Auto Login Editer", 368, 66, -1, -1,-1 ,$WS_EX_ACCEPTFILES)

$Misc4 = GUICtrlCreateInput("", 192, 48, 155, 20)

GUICtrlSetState(-1, $GUI_DROPACCEPTED)

GUISetState()

Do

$msg = GUIGetMsg()

Select

Case $msg = $Misc4

GUICtrlSetData($Misc4, FileOpenDialog("Browse to misc file 4", "", "(*.exe)", "", ""))

EndSelect

Until $msg = $GUI_EVENT_CLOSE

GUIDelete()

D:

Edited by Azu
Link to comment
Share on other sites

  • Moderators

D:

Where is that at?? The last code you posted had it here:

$Apply=GUICtrlCreateButton("Apply", 310, 0, 59, 20)

GUICtrlSetState(-1, $GUI_DROPACCEPTED)

GUISetState()

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

  • Moderators

Without using the Control Identifier, such as

$Input = GUICtrlCreateInput()
GUICtrlSetState($Input, $whatever)
$Input returning the Conrol ID of that particular location. - 1 well that means go back one control id location, when you go back that one location, your at the Button.

So instead of - 1 put the Variable name of the location you want to allow files to be dropped into.

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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