mattfaust
Active Members-
Posts
61 -
Joined
-
Last visited
About mattfaust
- Birthday 07/30/1977
Profile Information
-
Location
here
mattfaust's Achievements
Wayfarer (2/7)
0
Reputation
-
thanks
-
$password = !SQLPassword. it doesnt seem to work but the dos window is closing before I can read the output, it may be another issue. is there a way I can make the command window stay - or - capture the output, Im reading about StderrRead - but im a bit lost
-
so how would I use $command in RunWait, as it doesnt have the raw flag?
-
My password ( !SQLpassword ) is not getting read and entered correctly, why? thanks #include <GUIConstantsEx.au3> #include <ProgressConstants.au3> #include <WindowsConstants.au3> #include <EditConstants.au3> #include <StaticConstants.au3> #include <Process.au3> Local $SQLinstance,$user,$pw, $SaveDir, $progressbar, $button, $wait, $s, $msg, $m GUICreate("SQL DB Backup", 300, 140, 300, 200) $SQLinstance = GUICtrlCreateEdit("LOCALHOST\MSSQLEXPRESS", 10, 10, 200, 20) $user = GUICtrlCreateEdit("SQLusername", 10, 40, 200, 20) $pw = GUICtrlCreateEdit("!SQLpassword", 10, 70, 200, 20) $progressbar = GUICtrlCreateProgress(10, 100, 200, 20) GUICtrlSetColor(-1, 32250); not working with Windows XP Style ;$progressbar2 = GUICtrlCreateProgress(10, 40, 200, 20, $PBS_SMOOTH) $button = GUICtrlCreateButton("Start", 220, 100, 70, 20) $SaveDir = GUICtrlCreateEdit("D:\Backup\SQL" & @CRLF, 10, 120, 200, 20) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $button ; Run Notepad with the window maximized. ; $iPID = Run("notepad.exe", "", @SW_SHOWMAXIMIZED) RunBackup() EndSwitch WEnd Func RunBackup() $SQLinstance1=GUICtrlRead($SQLinstance) $username=GUICtrlRead($user) $password= GUICtrlRead($pw) $command = "sqlcmd -S "&$SQLinstance1&" -U "&$username&" -P "&$password&" -Q "&'"'&"BACKUP DATABASE testDB TO DISK="&"'"&"C:\temp\Backupsql.bak"&"'"&'"' ;RunWait($command) $iPID = Run("notepad.exe", "") Sleep (1000) Send ($command) ;exit EndFunc
-
im trying to run the following command By RunWait and there is quotes in the command I do not know how to process... please help this is what I need piped to the command line... sqlcmd -S KITCHENSQLEXPRESSSQLuser -P SQLpassword -Q "BACKUP DATABASE testDatabase TO DISK='C:tempBackupsql.bak'" I have this... $server = "Kitchen\SQLEXPRESS $user = "SQLuser $password = "SQLPassword" _RunWait "sqlcmd -S "&" -U "&"$user"&" -P "&"$password " im getting lost where there is a quote in the original command that needs to be passed to the command line
-
Admin Tools (Remote client control) Bypasing firewall
mattfaust replied to slaughter's topic in AutoIt Example Scripts
can you please explain it a bit further, I have my server set up with the files in the "to http" folder, and I have edited the client and the admin with the new server address. mysql database was restored to my server. No clients connect to the server, the log just keeps saying "registered" over and over, no tables in my db and the webfrontent shows no connections.... Where does the vnc repeater come in to play, I havent set anything up other than what was in the RAR file. Thanks for the code, It will be exactly waht I needed if I can get it going -
DVI-Remote (Remote Desktop entirely in AutoIt) - OpenSource!
mattfaust replied to JScript's topic in AutoIt Example Scripts
this is pretty impressive, I would also like to see a client server version, possibly with a contact list ( just like teamviewer or logmein) -
Actually, I read that thread prior to posting this one, From what I saw they said it would be very difficult to implement and it kinda ended there. Did I miss something?
-
Actually, I have made a bit of progess - using the BASS UDF. let me explain what Im doing, perhaps someone will have a better way to go about it. I am creating a "Avatar" for my home automation projects. Basically a computer will accept voice commands, then replay with text to speech output. Where this lil script will come into play, I found these great little animated models that display a face, and accept key commands for controlling the facial features aswell as opening the mouth. Here is a link to the models So my though was to make a simple little script that will simulate a SHIFT keypress, when audio is played. That way I could run my TTS separate and the model would react to whatever the computer plays. The BASS UDF has a example which I have hacked up but it roughly does what I need, I will post below. What I still need to work on, I would like the script to see any audio that the computer plays - right now it must be played from the BASS dll. TTS is gonna be tough because instead of just letting the TTS "talk", Im gonna have to save the TTS output to a wav - then play the wav with BASS. If anyone has any other ideas, I welcome any help! #include <Bass.au3> #include <BassConstants.au3> #include <GUIConstantsEx.au3> Global $playing_state = -1 ;Open Bass.DLL. Required for all function calls. _BASS_STARTUP ("BASS.dll") ;Initalize bass. Required for most functions. _BASS_Init (0, -1, 44100, 0, "") ;Check if bass iniated. If not, we cannot continue. If @error Then MsgBox(0, "Error", "Could not initialize audio") Exit EndIf ;Prompt the user to select a MP3 file ;$file = FileOpenDialog("Open...", "", "MP3 Files (*.*)") $file = ("testmusic.mp3") ;Create a stream from that file. $MusicHandle = _BASS_StreamCreateFile (False, $file, 0, 0, 0) ;Check if we opened the file correctly. If @error Then MsgBox(0, "Error", "Could not load audio file" & @CR & "Error = " & @error) Exit EndIf ;Create GUI and controls $Form1 = GUICreate("Example 2", 380, 190, 193, 115) $lblFileName = GUICtrlCreateLabel($file, 8, 8, 379, 17) $progress_slider = GUICtrlCreateSlider(8, 32, 374, 29) GUICtrlSetLimit(-1, 100, 0) $rightVol = GUICtrlCreateProgress(8, 88, 366, 17) GUICtrlSetLimit(-1, 100, 0) $LeftVol = GUICtrlCreateProgress(8, 136, 366, 17) GUICtrlSetLimit(-1, 100, 0) GUICtrlCreateLabel("Right Channel Volume Level", 8, 64, 150, 17) GUICtrlCreateLabel("Left Channel Volume Level", 8, 112, 150, 17) $Close = GUICtrlCreateButton("Close", 296, 160, 75, 25, 0) $Play_pause = GUICtrlCreateButton("Play/Pause", 216, 160, 75, 25, 0) $Stop = GUICtrlCreateButton("Stop", 136, 160, 75, 25, 0) ;Show GUI GUISetState(@SW_SHOW) run("mirror.exe") ;Get the length of the song in bytes. $song_length = _BASS_ChannelGetLength ($MusicHandle, $BASS_POS_BYTE) While 1 ;Get Current playback position $current = _BASS_ChannelGetPosition ($MusicHandle, $BASS_POS_BYTE) ;Calculate the percentage ; $percent = Round(($current / $song_length) * 100, 0) ;Set the slider to show percent ; GUICtrlSetData($progress_slider, $percent) ;Get Right/Left Playback Levels $levels = _BASS_ChannelGetLevel ($MusicHandle) ;Get Right and calculate percentage ; $rightChLvl = _LoWord ($levels) ; $rightChLvlper = Round(($rightChLvl / 32768) * 100, 0) ;Get Left and calculate percentage $LeftChLvl = _HiWord ($levels) $leftChLvlper = Round(($LeftChLvl / 32768) * 100, 0) ;Set the levels on GUI. ; GUICtrlSetData($rightVol, $rightChLvlper) ; GUICtrlSetData($LeftVol, $leftChLvlper) ;if $leftChLvlper > 50 Then ; Send("{RSHIFT down}") ;Else ; Send("{RSHIFT up}") ;EndIf if $leftChLvlper > 60 Then Send("{RSHIFT}") EndIf ;Get GUI Message $nMsg = GUIGetMsg() Switch $nMsg ;If Close button or red x, then exit. Alway remember to free resources Case $GUI_EVENT_CLOSE, $Close Exit Case $Play_pause ;Check if playing or paused, then take appropriate action Switch $playing_state Case 0; Song Paused, Resume. ;Resume Song _BASS_Pause () $playing_state = 1 Case - 1 ; Song stopped, start from begining. ;Play Song _BASS_ChannelPlay ($MusicHandle, 1) $playing_state = 1 Case 1 ; Song Playing, Pause ;Pause song _BASS_Pause () $playing_state = 0 EndSwitch Case $Stop ;Stop Song _BASS_ChannelStop ($MusicHandle) $playing_state = -1 EndSwitch WEnd Func OnAutoItExit() ;Free Resources _BASS_Free() EndFunc ;=
-
Thanks for the reply but Im looking for something different. Rather than detecting what level the volume control is current set, I need to detect when actual sound reaches a certain level. Basically like a eq would flash a bar only when a level is reached. As far as the OS, I can use any that autoit supports plus some
-
I want to trigger an action when the output of my soundcard is above a certain level, is their a simple way to do this. I dont care about the max setting set in the mixer, I need to detect when a certain threshold is passed when music is playing.
-
listview popilated by an excell column
mattfaust replied to mattfaust's topic in AutoIt GUI Help and Support
Any other ideas? I really need to figure this out and im not having alot of luck. If I do _ArrayDisplay($aArray1, "Vertical") It will display the data I need, in 1 vertical column with a index # on the left side. All I want to do is display the same array inside my GUI so I can select one of the items. The closest Ive been able to get is by running $ActiveJobs = GUICtrlCreateList("", 16, 40, 161, 253) _GUICtrlListView_AddArray($ActiveJobs, $aArray1) however it faults out with this message.. : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.: Im not sure what it is telling me, the array holds 250 items - Is there a limit on how many I can show in a listview? -
listview popilated by an excell column
mattfaust replied to mattfaust's topic in AutoIt GUI Help and Support
I was trying that last night, seem like the obvious choice for my goal however It kept giving me: C:\Program Files\AutoIt3\Include\GuiListView.au3 (520) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.: and I never figured out why -
listview popilated by an excell column
mattfaust replied to mattfaust's topic in AutoIt GUI Help and Support
Ive looked and I dont understand. do I need to add each item from the array to the list with _GUICtrlListView_AddItem? If I have a 1d array , isnt their a better way to set the listview to display that data. Basically what I have is an excel file, with 250 entries in column A that I want to display on a selectable list inside a gui, _ArrayDisplay($aArray1, "Vertical") shows me the data, but I cant seem to get it inside my Gui. I need the data to display and be selectable so that I can can pass the selected item form the list on to be used later