
Jjo
Active Members-
Posts
28 -
Joined
-
Last visited
Everything posted by Jjo
-
Hello, don't worry I don't inted to hack anything. I'm trying to make app that gathers information real time info from pokerstars (what everyone has done etc.) and when I normally try to select the text, which automatic dealer says, it works all fine. But when I make my script do that nothing happens, I bet pokerstars somehow blocks my autoit mousecommands. What to do? Ps. it works fine with other windows than pokerstars..
- 2 replies
-
- pokerstars
- click
-
(and 2 more)
Tagged with:
-
bump
-
So if anyone can remember the can they post example of face recognition code or explain how it should be done? Or does someone know link to a site that tells about it as simple as possible. I haven't had any luck with this so far... Is it too complicated or should I learn c++?
-
Is it possible to add commands and such to an exe? For example add something like this "If _IsPressed(F1) Then _NextTrack()" in winamp? -Never mind it can be done in winamp's options.
-
Nice little game, online high scores would be great.
-
Thx! Got it working.
-
I have made changes in registry so if i click file with mousebutton2 and choose "run with my program" then windows checks the command from registry i wish to execute. It can be like "C:\myprogram\program.exe -file" where the file is original file which I clicked with mousebutton2 and ran with my program. So how my program can read what was the file? Hope you understand
-
Run("program.exe -parameter") -> how can i read that parameter?
-
Musicplayer which can be controlled by keys f2,f4,f6... and it can download music from youtube and convert it to mp3. Works with bass.dll. Feel free to modify or use parts of the code. .Rar download here #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_icon="icon.ico" #AutoIt3Wrapper_outfile="Handy.exe" #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include "GUIConstantsEx.au3" #include "GuiListView.au3" #include "bass.au3" #include "inet.au3" AutoItSetOption("TrayAutoPause", 0) AutoItSetOption("TrayMenuMode", 1) Opt("GUIResizeMode",802) $ret = _BASS_Startup("bass.dll") _BASS_Init(0, -1, 44100, 0, "") If @error Then MsgBox(0, "Error", "Could not initialize audio") Exit EndIf Dim $folders[50000][2] Dim $files[50000][4] Dim $played[10000] Global $filep = -1 Global $download Global $folp Global $listdir Global $msg Global $filefp Global $mini Global $find Global $dfile Global $bytes Global $sound Global $isfind Global $win Global $repeat = 0 $mini=0 $should = 0 $sound = 0 $pl = 0 $next = 0 $check = 0 $shuffle=1 $vsel = -1 $back = 0 $dl = 0 $vbytes = -10000 $size = 0 $name = "" $vpros = 0 $earlier = 0 $seton=0 $np=-1 $aa=0 $lvl=0 $length=0 If Not FileExists(@AppDataDir & "\YouTube") Then DirCreate(@AppDataDir & "\YouTube") If Not FileExists(@AppDataDir & "\YouTube\ffmpeg.exe") Then FileCopy(@ScriptDir & "\ffmpeg.exe", @AppDataDir & "\YouTube\ffmpeg.exe") If Not FileExists(@ScriptDir & "\YouTube") Then DirCreate(@ScriptDir & "\YouTube") $listdir = "" & @ScriptDir & "\list.dat" If FileExists($listdir) = 0 Then MsgBox(0, "Creating playlist", "Select your music folder") $dir = FileSelectFolder("Select your music folder.", "") If $dir = "" Then While $dir = "" MsgBox(0, "Error", "Please select music folder correctly") $dir = FileSelectFolder("Select your music folder.", "") WEnd EndIf list($dir) list(@ScriptDir & "\Youtube") tofile() ElseIf FileExists($listdir) = 1 Then fromfile() EndIf ReDim $files[$filep + 1][4] $win = "HandyMusicPlayer " & $filep+1 & " Tracks" $settings = GUICreate("Settings",200,200) $sl1 = GUICtrlCreateLabel("Keys:",10,10) $sl2 = GUICtrlCreateLabel("F2=Pause",15,25) $sl3 = GUICtrlCreateLabel("F4=Play",15,40) $sl4 = GUICtrlCreateLabel("F6=Previous",15,55) $sl5 = GUICtrlCreateLabel("F8=Next",15,70) $sl6 = GUICtrlCreateLabel("F9=Toggle shuffle",15,85) $sl7 = GUICtrlCreateLabel("F12=Toggle repeat",15,100) $sb1 = GUICtrlCreateButton("OK", 160,160,30,30) $sc1 = GUICtrlCreateCheckbox("Shuffle", 10, 120) $sc2 = GUICtrlCreateCheckbox("Repeat", 10, 140) $dlgui = GUICreate("Downloading", 300, 50) $dlstatus = GUICtrlCreateLabel("", 10, 10, 280, 50) $gui = GUICreate($win, 400, 300) GUISetIcon("icon.ico") $l1 = GUICtrlCreateLabel("Music information, repeat = "&$repeat&", shuffle = "&$shuffle&"", 10, 10, 200, 15) $l2 = GUICtrlCreateLabel("Name:", 15, 25, 250, 15) $l3 = GUICtrlCreateLabel("%:", 15, 40, 320, 15) $p = GUICtrlCreateProgress(15,55,370,15) $b1 = GUICtrlCreateButton("Play", 170, 80, 70, 30) $b2 = GUICtrlCreateButton("Pause", 90, 80, 70, 30) $b3 = GUICtrlCreateButton("Previous", 10, 80, 70, 30) $b4 = GUICtrlCreateButton("Next", 250, 80, 70, 30) $b5 = GUICtrlCreateButton("Find track", 10, 120, 150, 30) $b6 = GUICtrlCreateButton("Download from Youtube", 170, 120, 150, 30) $b7 = GUICtrlCreateButton("Settings", 335, 10, 55, 30) $b8 = GUICtrlCreateButton("Rebuild list", 330, 80, 60, 60) $b9 = GUICtrlCreateButton("Mini mode", 260, 10, 65, 30) $list = _GUICtrlListView_Create($gui, "Playlist", 0, 150, 400, 150) _GUICtrlListView_SetColumnWidth($list, 0, 370) _GUICtrlListView_AddColumn($list, "Directorys") _GUICtrlListView_AddColumn($list, "Search results") _GUICtrlListView_AddColumn($list, "Result directorys") _GUICtrlListView_HideColumn($list, 1) _GUICtrlListView_HideColumn($list, 2) _GUICtrlListView_HideColumn($list, 3) _GUICtrlListView_AddArray($list, $files) GUISetState(@SW_SHOW, $gui) While 1 $alr = 0 $state=_BASS_ChannelIsActive($sound) $pros=_BASS_ChannelGetPosition($sound, $BASS_POS_BYTE)/($length+0.0000001)*100 GUICtrlSetData($p,$pros) if $vpros < $pros+0.1 then GUICtrlSetData($l3,"%: "&$pros) $vpros=$pros endif If $isfind = 1 Then $var = _GUICtrlListView_SubItemHitTest($list) If _IsPressed(01) and $var[0] > -1 Then For $i = 1 To $filep If $files[$i][0] = $files[$var[0]][2] Then $sel = $i _GUICtrlListView_SetSelectionMark($list, $i) EndIf Next EndIf Else $sel = _GUICtrlListView_GetSelectionMark($list) EndIf If $state = $BASS_ACTIVE_STOPPED And $earlier = 1 Then $next = 1 If $repeat = 1 Then $check = 1 EndIf If $sel <> $vsel And $sel > -1 Then $next = 1 If $next = 1 Or $back = 1 Then $earlier = 1 $vpos = 0 _BASS_SampleFree($sound) If $check = 0 Then If $back = 0 Then If $sel = $vsel Then if $shuffle=1 then $np = Random(1, $filep, 1) elseif $shuffle=0 then if $np < $filep then $np=$np+1 Else $np=0 endif endif Else $np = $sel EndIf $pl = $pl + 1 $played[$pl] = $np ElseIf $back = 1 Then $pl = $pl - 1 EndIf EndIf $spot = $played[$pl] If $isfind = 1 Then _GUICtrlListView_SetColumnWidth($list, 0, 370) _GUICtrlListView_HideColumn($list, 1) _GUICtrlListView_HideColumn($list, 2) _GUICtrlListView_HideColumn($list, 3) EndIf $sound = _BASS_SampleLoad( False, $files[$spot][1], 0, 1, 0, 1, $BASS_SAMPLE_OVER_POS) $length = _BASS_ChannelGetLength( $sound, $BASS_POS_BYTE) GUICtrlSetData($l2, "Name: " & $files[$spot][0] & "") GUICtrlSetData($l3,"%: 0") $vpros=0 $sound=_BASS_SampleGetChannel($sound, 0) _BASS_ChannelPlay($sound,1) if @error = $BASS_ERROR_HANDLE then MsgBox(0,"Error", "Handle is not a valid channel.") if @error = $BASS_ERROR_START then MsgBox(0,"Error", "The output is paused/stopped, use BASS_Start to start it.") if @error = $BASS_ERROR_DECODE then MsgBox(0,"Error", "The channel is not playable, it's a 'decoding channel'.") if @error = $BASS_ERROR_BUFLOST then MsgBox(0,"Error", "Should not happen... check that a valid window handle was used with BASS_Init.") if @error = $BASS_ERROR_NOHW then MsgBox(0,"Error", "No hardware voices are available.") $next = 0 $back = 0 $isfind = 0 EndIf $vsel = $sel $msg = GUIGetMsg() if $msg = $b9 Then $w=@DesktopWidth $h=@DesktopHeight if $mini=0 then WindowGlide($gui, $win, $w-405, $h-143, 405, 113, 200) WinSetOnTop($win,"",1) $mini=1 Else WindowGlide($gui, $win, $w/2-200, $h/2-150, 405, 333, 200) WinSetOnTop($win,"",0) $mini=0 endif endif If $msg = $b1 Or _IsPressed(73) And $state = $BASS_ACTIVE_PAUSED Then _BASS_ChannelPlay($sound,0) Send("{F4 up}") EndIf If $msg = $b2 Or _IsPressed(71) And $state = $BASS_ACTIVE_PLAYING Then _BASS_ChannelPause($sound) Send("{F2 up}") EndIf If $msg = $b3 Or _IsPressed(75) And $pl > 1 Then $back = 1 Send("{F6 up}") EndIf If $msg = $b4 Or _IsPressed(77) Then $next = 1 Send("{F8 up}") EndIf If $msg = $b5 and $dl=0 and $seton=0 and $isfind=0 Then if $isfind=1 then _GUICtrlListView_SetColumnWidth($list, 0, 370) _GUICtrlListView_HideColumn($list, 1) _GUICtrlListView_HideColumn($list, 2) _GUICtrlListView_HideColumn($list, 3) endif $isfind=0 $ff = InputBox("Find track", "Type part of track") If $ff Then findd($ff) EndIf EndIf If $msg = $b6 and $dl=0 and $seton=0 and $isfind=0 Then $search = InputBox("Find from Youtube", "Type correct link") If $search Then $source = _INetGetSource($search) $id = StringMid($source, StringInStr($source, "http://www.youtube.com/watch?v") + 31, 11) $size = download($id) If $size = -1 Then MsgBox(0, "Error", "") Else $spot=StringInStr($source, 'title=')+5 $title = StringRight($source, StringLen($source)-$spot) If $title = "" Then MsgBox(0, "Error", "Can't get the name of the track") Else $name = "Youtube - " & _TitleConvertHTML($title) For $i = 1 To $filep If $files[$i][0] = $name Then MsgBox(0, "Error", "You already have that track") $alr = 1 EndIf Next If $alr = 0 Then GUISetState(@SW_SHOW, $dlgui) $dl = 1 EndIf EndIf EndIf EndIf EndIf If _IsPressed("7B") Then If $repeat = 0 Then $repeat = 1 ElseIf $repeat = 1 Then $repeat = 0 EndIf GUICtrlSetData($l1, "Music information, repeat = " & $repeat & ", shuffle = "&$shuffle&"") Send("{F12 up}") $check=0 elseif _IsPressed("78") Then If $shuffle = 0 Then $shuffle = 1 ElseIf $shuffle = 1 Then $shuffle = 0 EndIf GUICtrlSetData($l1, "Music information, repeat = " & $repeat & ", shuffle = "&$shuffle&"") Send("{F9 up}") endif If $msg = $b7 and $dl=0 and $seton=0 and $isfind=0 Then GUISetState(@SW_SHOW, $settings) if $repeat=1 then GUICtrlSetData($sc2,1) EndIf if $shuffle=1 then GUICtrlSetState($sc1, 1) if $repeat=1 then GUICtrlSetState($sc2, 1) $seton=1 endif If $msg = $b8 Then rebuild() If WinActive($gui) Then If $msg = $GUI_EVENT_CLOSE Then OnAutoItExit() EndIf EndIf if WinGetState($gui) = 23 then GUISetState(@SW_HIDE, $gui) $tmsg=TrayGetMsg() if $tmsg=-7 then GUISetState(@SW_SHOW, $gui) GUISetState(@SW_RESTORE, $gui) endif if $seton=1 then if $msg=$sb1 then GUISetState(@SW_HIDE,$settings) $seton=0 EndIf if GUICtrlRead($sc1) = 1 then $shuffle=1 Else $shuffle=0 endif if GUICtrlRead($sc2) = 1 then $repeat=1 $check=0 Else $repeat=0 endif GUICtrlSetData($l1, "Music information, repeat = " & $repeat & ", shuffle = "&$shuffle&"") endif If $dl = 1 Then $bytes=InetGetInfo($dfile,0) If Round($bytes / 1024 / 1024, 1) > $vbytes Then GUICtrlSetData($dlstatus, Round($bytes / 1024 / 1024, 1) & "Mb / " & Round(InetGetInfo($dfile,1) / 1024 / 1024, 1) & " Mb " & Round(100 * ($bytes / InetGetInfo($dfile,1))) & "%" & Chr(10) & "" & $name & "") $vbytes = Round($bytes / 1024 / 1024, 1) EndIf If InetGetInfo($dfile,2) Then TrayTip("Download finished", "Downloaded track is the last track in playlist", 0) convert(@ScriptDir & "\Youtube\" & $name & ".mp3") GUISetState(@SW_HIDE, $dlgui) $f = FileOpen(@ScriptDir & "\list.dat", 1) FileWriteLine($f, $name) FileWriteLine($f, @ScriptDir & "\Youtube\" & $name & ".mp3") FileClose($f) $filep = $filep + 1 ReDim $files[$filep + 2][4] fromfile() _GUICtrlListView_DeleteAllItems($list) _GUICtrlListView_SetColumnWidth($list, 0, 370) _GUICtrlListView_HideColumn($list, 1) _GUICtrlListView_HideColumn($list, 2) _GUICtrlListView_HideColumn($list, 3) _GUICtrlListView_AddArray($list, $files) _GUICtrlListView_SetSelectionMark($list, 0) $name = "" $size = 0 GUICtrlSetData($dlstatus, "") $vbytes = 0 $dl = 0 EndIf EndIf Sleep(5) WEnd Func _TitleConvertHTML($n_title) $r_title = StringReplace($n_title, '+', ' ') $r_title = StringReplace($r_title, '%2B', '+') $r_title = StringReplace($r_title, '%3D', '=') $r_title = StringReplace($r_title, '%22', '"') $r_title = StringReplace($r_title, '%27', "'") $r_title = StringReplace($r_title, '%60', '`') $r_title = StringReplace($r_title, '%28', '(') $r_title = StringReplace($r_title, '%29', ')') $r_title = StringReplace($r_title, '%5B', '[') $r_title = StringReplace($r_title, '%5D', ']') $r_title = StringReplace($r_title, '%3A', ':') $r_title = StringReplace($r_title, '%2C', ',') $r_title = StringReplace($r_title, '%23', '#') $r_title = StringReplace($r_title, '%2F', '/') $r_title = StringReplace($r_title, '%21', '!') $r_title = StringReplace($r_title, '%3F', '?') $r_title = StringReplace($r_title, '%26', '&') $r_title = StringReplace($r_title, '%7C', '|') $r_title = StringReplace($r_title, '%40', '@') $r_title = StringReplace($r_title, '%5E', '^') $r_title = StringReplace($r_title, '%2A', '*') $r_title = StringReplace($r_title, '%7E', '~') $r_title = StringReplace($r_title, '%C2%AB', '«') $r_title = StringReplace($r_title, '%C2%BB', '»') $r_title = StringReplace($r_title, '%C2%B0', '°') $r_title = StringReplace($r_title, '%C2%B7', '·') $r_title = StringReplace($r_title, '%C3%A9', 'é') $r_title = StringReplace($r_title, '%C3%A8', 'è') $r_title = StringReplace($r_title, '%C3%AA', 'ê') $r_title = StringReplace($r_title, '%C3%A0', 'à') $r_title = StringReplace($r_title, '%C3%A1', 'á') $r_title = StringReplace($r_title, '%C3%A2', 'â') $r_title = StringReplace($r_title, '%C3%A7', 'ç') $r_title = StringReplace($r_title, '%C3%B1', 'ñ') $r_title = StringReplace($r_title, '%C2%A1', '¡') $r_title = StringReplace($r_title, '%C2%A5', '¥') $r_title = StringReplace($r_title, '%C2%BF', '¿') $r_title = StringReplace($r_title, '%E2%80%A2', '•') $r_title = StringReplace($r_title, '%E2%84%A2', '™') Return $r_title EndFunc ;==>_TitleConvertHTML Func list($dir) $old = $dir FileChangeDir($dir) $first = FileFindFirstFile("*") While 1 $h = FileFindNextFile($first) $whole = "" & $dir & "\" & $h & "" $att = FileGetAttrib($h) $ext = StringLower(StringRight($h, 3)) If $ext = "mp3" Or $ext = "wma" Or $ext = "wav" Then $filep = $filep + 1 $files[$filep][0] = StringLeft($h, StringLen($h) - 4) $files[$filep][1] = $whole ElseIf StringInStr($att, "D") <> 0 Then $folp = $folp + 1 $folders[$folp][0] = $whole EndIf If $h = "" Then ExitLoop If @error = 1 Then ExitLoop WEnd For $x = 1 To $folp If $folders[$x][1] = 0 Then $folders[$x][1] = 1 list($folders[$x][0]) EndIf Next FileChangeDir($old) EndFunc ;==>list Func tofile() $f = FileOpen($listdir, 2) For $i = 0 To $filep FileWriteLine($f, $files[$i][0]) FileWriteLine($f, $files[$i][1]) Next FileClose($f) EndFunc ;==>tofile Func fromfile() $f = FileOpen($listdir, 0) $i = -1 While 1 $i = $i + 1 $files[$i][0] = FileReadLine($f) $files[$i][1] = FileReadLine($f) If @error Then ExitLoop WEnd $filep = $i FileClose($f) EndFunc ;==>fromfile Func findd($stri) If $stri = "" Then MsgBox(0, "Error", "input field is empty") $sure = 1 Else $sure = 0 EndIf If $stri <> "" And $sure = 0 Then For $k = 0 To $filefp $files[$k][3] = "" $files[$k][2] = "" Next $filefp = -1 $files[0][2] = "Search results with (" & $stri & ")" For $d = 0 To $filep If StringInStr($files[$d][0], $stri) <> 0 Then $filefp = $filefp + 1 $files[$filefp][2] = $files[$d][0] $files[$filefp][3] = $files[$d][1] EndIf Next If $filefp > -1 Then _GUICtrlListView_DeleteAllItems($list) _GUICtrlListView_SetColumnWidth($list, 2, 370) _GUICtrlListView_HideColumn($list, 0) _GUICtrlListView_HideColumn($list, 1) _GUICtrlListView_HideColumn($list, 3) _GUICtrlListView_AddArray($list, $files) $isfind = 1 Else MsgBox(0, "Find track", "0 tracks founded") EndIf EndIf EndFunc ;==>findd Func download($id) $source = _INetGetSource("http://www.youtube.com/get_video_info?&video_id=" & $id) $sign = StringMid($source, StringInStr($source, "&token=") + 7, StringInStr($source, "&thumbnail_url=")) $download = "http://www.youtube.com/get_video?video_id=" & $id & "&t=" & $sign & "&fmt=18" If StringInStr($source, "fail") > 0 Then $size = -1 Else FileDelete(@AppDataDir & "\YouTube\tempfile.mp4") $dfile=Inetget($download,@AppDataDir & "\YouTube\tempfile.mp4", 1, 1) $size=1 EndIf Return $size EndFunc ;==>download Func convert($out) $s_cmd = "ffmpeg.exe -i " & Chr(34) & "" & @AppDataDir & "\YouTube\tempfile.mp4" & Chr(34) & " -acodec mp3 -ab 128 -ar 44100 -ac 2 " & Chr(34) & "" & $out & "" & Chr(34) & "" $ffmpeg = Run(@AppDataDir & '\YouTube\' & $s_cmd, @AppDataDir & '\YouTube', @SW_HIDE, 4) EndFunc ;==>convert Func rebuild() GUISetState(@SW_HIDE, $gui) FileDelete(@ScriptDir & "\list.dat") Run(@ScriptDir & "\Handy.exe") Exit EndFunc ;==>rebuild Func OnAutoItExit() _BASS_Free() _BASS_SampleFree($sound) exit EndFunc ;==>OnAutoItExit Func WindowGlide($hwnd, $text, $x, $y, $width, $height, $time = 200) Local $OrgPos = WinGetPos($hwnd, $text) If @error Then Return SetError(1, 0, 0) EndIf Local $NewPos[4] Local $timer = TimerInit() Local $percent_done = 0 While TimerDiff($timer) < $time Sleep(10) $percent_done = TimerDiff($timer) / $time $NewPos[0] = $OrgPos[0] + ($x - $OrgPos[0]) * $percent_done $NewPos[1] = $OrgPos[1] + ($y - $OrgPos[1]) * $percent_done $NewPos[2] = $OrgPos[2] + ($width - $OrgPos[2]) * $percent_done $NewPos[3] = $OrgPos[3] + ($height - $OrgPos[3]) * $percent_done WinMove($hwnd, $text, $NewPos[0], $NewPos[1], $NewPos[2], $NewPos[3]) WEnd WinMove($hwnd, $text, $x, $y, $width, $height) Return 1 EndFunc
-
BASS Function Library (Sound and Music Functions)
Jjo replied to BrettF's topic in AutoIt Example Scripts
Got it working, thx. Maybe it was just me but i had to add line "Global $BASS_DWORD_ERR" in the bass.au3. -
BASS Function Library (Sound and Music Functions)
Jjo replied to BrettF's topic in AutoIt Example Scripts
#include "Bass.au3" $bass_dll = DllOpen("..\BASS.dll") _BASS_Init($bass_dll, 0, -1, 44100, 0, "") -----> >"C:\Program Files\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:\Documents and Settings\Perus\Omat tiedostot\helvetin hieno testi\aaa.au3" /autoit3dir "C:\Program Files\AutoIt3" /UserParams +>12:34:32 Starting AutoIt3Wrapper v.2.0.0.1 Environment(Language:040B Keyboard:0000040B OS:WIN_XP/Service Pack 3 CPU:X64 OS:X86) >Running AU3Check (1.54.19.0) from:C:\Program Files\AutoIt3 +>12:34:32 AU3Check ended.rc:0 >Running:(3.3.2.0):C:\Program Files\AutoIt3\autoit3.exe "C:\Documents and Settings\Perus\Omat tiedostot\helvetin hieno testi\aaa.au3" C:\Documents and Settings\Perus\Omat tiedostot\helvetin hieno testi\Bass.au3 (404) : ==> Subscript used with non-Array variable.: Return SetError(0, "", $BASS_ret_[0]) Return SetError(0, "", $BASS_ret_^ ERROR ->12:34:32 AutoIT3.exe ended.rc:1 +>12:34:33 AutoIt3Wrapper Finished >Exit code: 1 Time: 1.769 -
BASS Function Library (Sound and Music Functions)
Jjo replied to BrettF's topic in AutoIt Example Scripts
Doesn't work on AutoIt 3.3.2.0? -
#include <Bass.au3> #include <BassConstants.au3> #include <GUIConstantsEx.au3> Global $playing_state = -1 ;Open Bass.DLL. Required for all function calls. $bass_dll = DllOpen("..\BASS.dll") ;Initalize bass. Required for most functions. _BASS_Init($bass_dll, 0, -1, 44100, 0, "") _BASS_RecordInit($bass_dll, -1) ;Check if bass iniated. If not, we cannot continue. If @error Then MsgBox(0, "Error", "Could not initialize audio") Exit EndIf $gui=GUICreate("Testiä",400,300) $p=GUICtrlCreateProgress(10,10,380,20) GUISetState() $record=_BASS_RecordStart($bass_dll,44100, 2, 0) $lvl=0 While 1 $lvl=_BASS_ChannelGetLevel($bass_dll, $record) GUICtrlSetData($p,$lvl/100000) $msg=GUIGetMsg() if $msg=$GUI_EVENT_CLOSE then exit WEnd Func OnAutoItExit() ;Free Resources _BASS_RecordFree($bass_dll) _BASS_Free($bass_dll) EndFunc ;==>OnAutoItExit Here is the problem in autoit code, as you see it reacts in any sound not only mic sound.
-
Is it possible to monitor microphone sound level without recording? And it shouldn't react in anyway if winamp is playing music or so. I have tried winmm.dll and bass.dll but it always shows also musicplayers sound level.
-
Ok that worked, thanks.
-
Looks interesting but every time when I run some of the scripts here it doesn't work. C:\Program Files\AutoIt3\Include\_Fann.au3 (48) : ==> Subscript used with non-Array variable.: Return $hAnn[0] Return $hAnn^ ERROR
-
No viruses here! Fixed some bugs, feedback?
-
Very nice little program, working perfectly.
-
How to check if page load sucess AND the page is aviable?
Jjo replied to Gillboss's topic in AutoIt General Help and Support
Well i made example where script tests if the page is available. #include <IE.au3> $url="http://www.notexistingwebpage.com" $ie=_IECreate($url) _IELoadWait($ie) $source=_IEDocReadHTML($ie) if StringInStr($source, "cannot display the web") > 0 then MsgBox(0,"Not real page","") Exit Else MsgBox(0,"Succes","") endif -
This is very easy to use musicplayer i made. It can download music from youtube, it converts them to mp3 and adds to playlist. It can be controlled by keys = F2,F4,F6,F8,F12 (usually those keys does nothing) and keys works also if musicplayer is not active.First start takes longer than starts after that. FIXED: no bugs and names of downloaded tracks are correct. Download link = click here
-
Still doesn't work, any ideas? E: got it working, I'll post it too if someone is interested about simple youtube downloader. <snip>
-
I tried to search solution but every youtube downloader's source code is too complicated. so what i'm doing wrong here, it says that size is 0. #include <String.au3> #include <inet.au3> $id="XAYhNHhxN0A&feature=related&fmt=18" $download = "http://www.youtube.com/get_video?video_id=" & $id & "" MsgBox(0,"File size", InetGetSize($download)) InetGet($download, "D:\music\file.flv", 1, 1) While @InetGetActive TrayTip("",@InetGetBytesRead,1000) wend
-
I have tried to make multilayer neural network which learns to play tic-tac-toe. Something like this, it haves 9 neurons simulating the situation, 14 hidden neurons and 9 output neurons. I have weights in every link and I tried make it remember links so it can make them stronger or weaker. Depending did it win. Anyways it haves always some problems. If someone can make simple example of neural networks it would be great
-
Works well but it's kinda useless
-
Is that even possible? Anyway, well made game >_