AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

more than one list view

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
CForce



Joined: 27 Oct 2007
Posts: 16
Location: Hawaii

PostPosted: Sat Apr 12, 2008 11:37 pm    Post subject: more than one list view Reply with quote

lol ok i know that this sounds a little nooby but i cant get the info out of more than one list view
heres the code

Code:
#Persistent
#SingleInstance Force
setworkingdir Data\
Gui, Add, Tab2, w700 buttons h515, Music|Videos|Import|Options|About|Help
Gui, Tab, Music
Gui, Color, 0000FF
Gui, Add, ListView, r30 w675 gplay, Music Library
Loop, Library\Music\*.*
    LV_Add("", A_LoopFileName)
Gui, Add, Button,, &Stop Music
Gui, Tab, Videos
Gui, Color, 0000FF
Gui, Add, ListView, r30 w675 gplay, Video Library
Loop, Library\Videos\*.*
   LV_Add("", A_LoopFileName)
Gui, Add, Button,, &Stop Video
Gui, Tab
Gui, Add, StatusBar,, Welcome to BlueMask Music/Video Player
SB_SetIcon("Icons\blue mask.ico")
Gui, Show



Return

GuiClose:
ExitApp

play:
if A_GuiEvent = DoubleClick
{
    LV_GetText(RowText, A_EventInfo)  ; Get the text from the row's first field.
   DetectHiddenWindows, On
   Process, Exist
   hAHK := WinExist("ahk_pid " . ErrorLevel)
      GuiControl, ,text, Now playing: %RowText%

   OnMessage(MM_MCINOTIFY   := 0x03B9, "MM_MCINOTIFY")
   ;OnMessage(MM_MCISIGNAL   := 0x03CB, "MM_MCISIGNAL")

   DllCall("winmm\mciSendStringA", "str", "open """ . RowText . """ alias RowText type mpegvideo style overlapped shareable", "Uint", 0, "Uint", 0, "Uint", 0)
   DllCall("winmm\mciSendStringA", "str", "play RowText notify", "Uint", 0, "Uint", 0, "Uint", hAHK)

   MM_MCINOTIFY(wParam, lParam)
   {
   /*
   MCI_NOTIFY_SUCCESSFUL   = 0x1
   MCI_NOTIFY_SUPERSEDED   = 0x2
   MCI_NOTIFY_ABORTED   = 0x4
   MCI_NOTIFY_FAILURE   = 0x8
   */
   DllCall("winmm\mciExecute", "str", "close RowText")
   }

}
return

_________________
Club Live Bots
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Guest






PostPosted: Sun Apr 13, 2008 12:20 am    Post subject: Reply with quote

you should add names to the listviews and add the code below inside the play label
Code:
; Change "Listview1" and "Listview2" to whatever you named your listviews
If A_GuiControl = Listview1
  Gui, ListView, Listview1
Else If A_GuiControl = Listview2
  Gui, ListView, Listview2
Back to top
CForce



Joined: 27 Oct 2007
Posts: 16
Location: Hawaii

PostPosted: Sun Apr 13, 2008 3:32 am    Post subject: Reply with quote

i found a diffrent way but thank you though but now the sound wont play any one got any ideas oh ya heres the newer source

Code:
#Persistent
#SingleInstance Force
setworkingdir Data\
Version = 1.0
UrlDownloadToFile, http://herabot.asssoft.org/downloads/programs/bluemask/version.txt, Settings\Version\Version.txt
FileReadLine, dlversion, Settings\Version\Version.txt, 1
if version < dlversion
{
   MsgBox, 68, Update, Version %dlversion% has been released`nYou currently have version %Version%`nWould you like to up-date?
   IfMsgBox No
      goto, noupdate
   IfMsgBox Yes
      goto, dllatest
}
noupdate:
FileDelete, Settings\Version\Version.txt
Menu, TRAY, NoStandard
Gui, Add, Tab2, w700 buttons h515, Music|Videos|Import|Options|About|Help
Gui, Tab, Music
Gui, Add, ListView, r30 w675 gMusic, Music Library
Loop, Library\Music\*.*
    LV_Add("", A_LoopFileName)
Gui, Add, Button,, &Stop Music
Gui, Tab, Videos
Gui, Add, ListView, r30 w675 gVideo, Video Library
Loop, Library\Videos\*.*
   LV_Add("", A_LoopFileName)
Gui, Add, Button,, &Stop Video
Gui, Tab
Gui, Add, StatusBar,, Welcome to BlueMask Music/Video Player
SB_SetIcon("Icons\blue mask.ico")
Gui, Show
hIcon32 := DllCall("LoadImage", uint, 0
    , str, "Icons\blue mask.ico"  ; Icon filename (this file may contain multiple icons).
    , uint, 1  ; Type of image: IMAGE_ICON
    , int, 32, int, 32  ; Desired width and height of image (helps LoadImage decide which icon is best).
    , uint, 0x10)  ; Flags: LR_LOADFROMFILE
Gui +LastFound
SendMessage, 0x80, 1, hIcon32  ; 0x80 is WM_SETICON; and 1 means ICON_BIG (vs. 0 for ICON_SMALL).
Gui, Show



Return

GuiClose:
ExitApp

Video:
if A_GuiEvent = DoubleClick
{
    LV_GetText(RowText, A_EventInfo)  ; Get the text from the row's first field.
   Video = Library\Videos\%RowText%
   SB_SetText(Now playing: %Rowtext%)
   DetectHiddenWindows, On
   Process, Exist
   hAHK := WinExist("ahk_pid " . ErrorLevel)
   
   OnMessage(MM_MCINOTIFY   := 0x03B9, "MM_MCINOTIFY")
   ;OnMessage(MM_MCISIGNAL   := 0x03CB, "MM_MCISIGNAL")

   DllCall("winmm\mciSendStringA", "str", "open """ . video . """ alias video type mpegvideo style overlapped shareable", "Uint", 0, "Uint", 0, "Uint", 0)
   DllCall("winmm\mciSendStringA", "str", "play video notify", "Uint", 0, "Uint", 0, "Uint", hAHK)

   MM_MCINOTIFY(wParam, lParam)
   {
   /*
   MCI_NOTIFY_SUCCESSFUL   = 0x1
   MCI_NOTIFY_SUPERSEDED   = 0x2
   MCI_NOTIFY_ABORTED   = 0x4
   MCI_NOTIFY_FAILURE   = 0x8
   */
   DllCall("winmm\mciExecute", "str", "close video")
   }

}
return

Music:
If A_GuiEvent = DoubleClick
{
   
   LV_GetText(RowText, A_EventInfo)
   Music = Library\Music\%RowText%
   SoundPlay, %Music%
}
return

dllatest:
sUrl  := "http://herabot.asssoft.org/downloads/programs/bluemask/BlueMask.exe"
sFile := "BlueMask.exe"

Progress, % "M W" . A_ScreenWidth//2, 0, 0 of 0
VarSetCapacity(vt, 4*11), nParam = 31132253353
Loop, Parse, nParam
   NumPut(RegisterCallback("DownloadProgress", "Fast", A_LoopField, A_Index-1), vt, 4*(A_Index-1))
DllCall("urlmon\URLDownloadToFileA", "Uint", 0, "str", sUrl, "str", sFile, "Uint", 0, "UintP", &vt)

DownloadProgress(pthis, nProgress = 0, nProgressMax = 0, nStatusCode = 0, pStatusText = 0)
{
   If A_EventInfo = 6
   Progress, % p := 100 * nProgress//nProgressMax, %p%, % nProgress . " of " . nProgressMax
   Return 0
}

_________________
Club Live Bots
Back to top
View user's profile Send private message Send e-mail Visit poster's website
CForce



Joined: 27 Oct 2007
Posts: 16
Location: Hawaii

PostPosted: Sun Apr 13, 2008 11:03 pm    Post subject: Reply with quote

i fixed it lock please
_________________
Club Live Bots
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group