ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Post New Requests Here

IDEA: Little help with this code

(1/1)

Candle:
I can't seem to get the buttons to work?


--- ---Gui,2: Add, ListBox, x0 y0 w343 h500,
Gui,2: Show, x131 y91 h562 w561, New GUI Window
Gui,2: Add, Picture, x376 y140 w160 h390 , banner.jpg
Gui,2: Add, Button, x376 y90 w160 h30 , Save to File
Gui,2: Add, Button, x376 y30 w160 h30 , Select Folder
; Generated using SmartGUI Creator 4.0

Return

buttonselectfolder:
FileSelectFolder, OutputVar, , 3
if OutputVar =
    MsgBox, You didn't select a folder.
else
    MsgBox, You selected folder "%OutputVar%".

 Loop, "%OutputVar%"\*.mp3, 0, 1
{
   Pic%A_Index% = %A_LoopFileFullPath%
   If A_Index = 1
     GUIControl,2:, ListBox1, |%A_LoopFileName%||
   Else
    GUIControl,2:,ListBox1,%A_LoopFileName%
}
Return
GuiClose:
ExitApp
Thanks for any help with this.

edit by brotherS: If you don't say anything about your code (so that newbies can follow) it might be better to post @ the AHK forums directly.

skrommel:
 :) To make a button do anything, you have to add a G<procedure_to_go_to> to the options.


--- ---Gui,Add,Button,GJUMPHERE,Click Me!
Gui,Show,w200 h200
Return

JUMPHERE:
MsgBox,Clicked!
Return
Skrommel

Candle:
Thank you for the help.
Can you tell why it is not showing up in the editbox?

skrommel:
 :) Try removing the "s in the Loop line:


--- ---Loop, %OutputVar%\*.mp3, 0, 1
Skrommel

Navigation

[0] Message Index

Go to full version