kemo1987 Posted November 26, 2011 Share Posted November 26, 2011 (edited) hello at first sorry about my bad englishi want to edit For statement first i read phone.txt to arraynext i send line by line to another program(Eyebeam)and now i want send each line with different keys ( CTRL + 1) to (CTRL + 6) then loopcode below only send numbers within (CTRL + 1)for example :send (CTRL + 1) + ESC + 201120675645 + ENTERsleep(1000)send (CTRL + 2) + ESC + 00201120675645+ ENTERsleep(1000)send (CTRL + 3) + ESC + 000201120675645+ ENTERsleep(1000)send (CTRL + 4) + ESC + 011201120675645+ ENTERsleep(1000)send (CTRL + 5) + ESC + 002201120675645+ ENTERsleep(1000)send (CTRL + 6) + ESC + 001201120675645+ ENTERsleep(4000)and back to first line with ctrl+1 and line 7 in phone.txtphone.txt > contains 2011206756450020112067564500020112067564501120112067564500220112067564500120112067564592011206756459920112067564590201120675645900201120675645910201120675645901120112067564582011206756458820112067564588820112067564580201120675645800201120675645810201120675645============================================$filePhone = "phone.txt" Global $aFile_phone _FileReadToArray($filePhone, $aFile_phone) Func _aCall() ; calling phone list. ;WinActivate("eyeBeam","") for $iphone = 1 To $aFile_phone[0] $phone = $aFile_phone[$iphone] ControlSend("[CLASS:SUAWINCLIENTCLASS]", "", "", "^1") ; send ctrl + 1 to switch to line 1 in eyebeam ControlSend("[CLASS:SUAWINCLIENTCLASS]", "", "", "{ESC}") ;send esc to cancel last call if exist ControlSend("[CLASS:SUAWINCLIENTCLASS]", "", "", $phone) ; send phone numbers array ControlSend("[CLASS:SUAWINCLIENTCLASS]", "", "", "{ENTER}") ; send enter to start call Sleep(4000) Next EndFuncThank you Edited November 26, 2011 by kemo1987 Link to comment Share on other sites More sharing options...
KaFu Posted November 26, 2011 Share Posted November 26, 2011 (edited) Something like this? $filePhone = "phone.txt" Global $aFile_phone _FileReadToArray($filePhone, $aFile_phone) Func _aCall() ; calling phone list. ;WinActivate("eyeBeam","") $i = 1 For $iphone = 1 To $aFile_phone[0] $phone = $aFile_phone[$iphone] ControlSend("[CLASS:SUAWINCLIENTCLASS]", "", "", "^" & $i) ; send ctrl + 1 to switch to line 1 in eyebeam ControlSend("[CLASS:SUAWINCLIENTCLASS]", "", "", "{ESC}") ;send esc to cancel last call if exist ControlSend("[CLASS:SUAWINCLIENTCLASS]", "", "", $phone) ; send phone numbers array ControlSend("[CLASS:SUAWINCLIENTCLASS]", "", "", "{ENTER}") ; send enter to start call Sleep(4000) $i += 1 If $i = 7 Then $i = 1 Next EndFunc ;==>_aCall Edited November 26, 2011 by KaFu OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21)HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
kemo1987 Posted November 26, 2011 Author Share Posted November 26, 2011 KaFu Thank you very much It's work so nice Link to comment Share on other sites More sharing options...
KaFu Posted November 26, 2011 Share Posted November 26, 2011 You're welcome ... OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21)HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
kemo1987 Posted November 26, 2011 Author Share Posted November 26, 2011 heythere is a bug in send CTRL1sometimes it send number of variable $i without CTRLmaybe it need slow send delayi hope it down CTRL and send $i then Ctrl upand we can work with {F1} - {F6} keys instead of CTRL ControlSend("[CLASS:SUAWINCLIENTCLASS]", "", "", "^" & $i)any help ? Link to comment Share on other sites More sharing options...
kemo1987 Posted November 26, 2011 Author Share Posted November 26, 2011 Done i solved it with if statement Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now