Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • December 03, 2016, 11:49:50 AM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: IDEA: Little help with this code  (Read 2656 times)

Candle

  • Participant
  • Joined in 2006
  • *
  • default avatar
  • Posts: 18
    • View Profile
    • Donate to Member
IDEA: Little help with this code
« on: December 24, 2006, 09:08:05 AM »
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.
« Last Edit: December 25, 2006, 09:24:01 AM by brotherS »

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 886
    • View Profile
    • 1 Hour Software by skrommel
    • Donate to Member
Re: Little help with this code
« Reply #1 on: December 24, 2006, 06:17:10 PM »
 :) 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
Please stop by my site at  1 Hour Software by skrommel  for downloads and more info.

Candle

  • Participant
  • Joined in 2006
  • *
  • default avatar
  • Posts: 18
    • View Profile
    • Donate to Member
Re: Little help with this code
« Reply #2 on: December 24, 2006, 06:22:34 PM »
Thank you for the help.
Can you tell why it is not showing up in the editbox?

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 886
    • View Profile
    • 1 Hour Software by skrommel
    • Donate to Member
Re: Little help with this code
« Reply #3 on: December 25, 2006, 03:00:10 AM »
 :) Try removing the "s in the Loop line:

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

Skrommel
Please stop by my site at  1 Hour Software by skrommel  for downloads and more info.