05-29-2009, 03:58 PM
so have a function called SingleFunc and put the code in it then in my other functions put SingleFunc on top line? like this
SingleFunc
__Handle+ __mutex_singlefunction ;;if __Handle is unknown identifier, replace to int
if(!__mutex_singlefunction) __mutex_singlefunction=CreateMutex(0 0 0)
if(WaitForSingleObject(__mutex_singlefunction 0)=WAIT_TIMEOUT) end
S1
SingleFunc
if(IsWindowVisible(child(15 "5" "Edit" win("New Text Document (7) - Notepad" "Notepad") 0x5)))
OnScreenDisplay "5"
S2
SingleFunc
if(IsWindowVisible(child(15 "10" "Edit" win("New Text Document (7) - Notepad" "Notepad") 0x5)))
OnScreenDisplay "10"
SingleFunc
__Handle+ __mutex_singlefunction ;;if __Handle is unknown identifier, replace to int
if(!__mutex_singlefunction) __mutex_singlefunction=CreateMutex(0 0 0)
if(WaitForSingleObject(__mutex_singlefunction 0)=WAIT_TIMEOUT) end
S1
SingleFunc
if(IsWindowVisible(child(15 "5" "Edit" win("New Text Document (7) - Notepad" "Notepad") 0x5)))
OnScreenDisplay "5"
S2
SingleFunc
if(IsWindowVisible(child(15 "10" "Edit" win("New Text Document (7) - Notepad" "Notepad") 0x5)))
OnScreenDisplay "10"