Sign in to follow this  
Followers 0
kemo1987

(SOLVED)For statement i need to edit it

6 posts in this topic

#1 ·  Posted (edited)

hello :D

at first sorry about my bad english

i want to edit For statement

first i read phone.txt to array

next 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 loop

code below only send numbers within (CTRL + 1)

for example :

send (CTRL + 1) + ESC + 201120675645 + ENTER

sleep(1000)

send (CTRL + 2) + ESC + 00201120675645+ ENTER

sleep(1000)

send (CTRL + 3) + ESC + 000201120675645+ ENTER

sleep(1000)

send (CTRL + 4) + ESC + 011201120675645+ ENTER

sleep(1000)

send (CTRL + 5) + ESC + 002201120675645+ ENTER

sleep(1000)

send (CTRL + 6) + ESC + 001201120675645+ ENTER

sleep(4000)

and back to first line with ctrl+1 and line 7 in phone.txt

phone.txt > contains

  • 201120675645
  • 00201120675645
  • 000201120675645
  • 011201120675645
  • 002201120675645
  • 001201120675645
  • 9201120675645
  • 99201120675645
  • 90201120675645
  • 900201120675645
  • 910201120675645
  • 9011201120675645
  • 8201120675645
  • 88201120675645
  • 888201120675645
  • 80201120675645
  • 800201120675645
  • 810201120675645
============================================

$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
EndFunc

Thank you

Edited by kemo1987

Share this post


Link to post
Share on other sites



#2 ·  Posted (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 by KaFu

Share this post


Link to post
Share on other sites

KaFu Thank you very much

It's work so nice :D

Share this post


Link to post
Share on other sites

hey

there is a bug in send CTRL1

sometimes it send number of variable $i without CTRL

maybe it need slow send delay

i hope it down CTRL and send $i then Ctrl up

and we can work with {F1} - {F6} keys instead of CTRL

ControlSend("[CLASS:SUAWINCLIENTCLASS]", "", "", "^" & $i)

any help ?

Share this post


Link to post
Share on other sites

Done i solved it with if statement :D

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0