按键精灵吧 关注:500,421贴子:1,030,134
  • 24回复贴,共1

有人练手吗?求写个小脚本!

只看楼主收藏回复


我要隔5分钟,按一次数字键1,再隔5分钟按一次数字键2,再隔5分钟按一次数字键3....一直到数字键5,这个循环。
每隔两个小时按一次6,这个也是循环的。
怎么弄了?


1楼2014-10-27 17:57回复
    开始不用按吧?


    2楼2014-10-27 20:13
    收起回复
      2025-11-14 23:50:52
      广告
      不感兴趣
      开通SVIP免广告
      用双线程解决就可以了


      3楼2014-10-27 20:36
      收起回复
        Do
        Delay 5 * (60 * 1000)
        KeyPress 49, 1
        Delay 10
        Delay 5 * (60 * 1000)
        KeyPress 50, 1
        Delay 10
        Delay 5 * (60 * 1000)
        KeyPress 51, 1
        Delay 10
        Delay 5 * (60 * 1000)
        KeyPress 52, 1
        Delay 5 * (60 * 1000)
        KeyPress 53,1
        Delay 120 * (60 * 1000)
        KeyPress 54, 1
        Delay 10
        loop


        4楼2014-10-27 22:46
        收起回复
          不用多线程你这问题解决不了啊楼主


          IP属地:新加坡来自iPhone客户端5楼2014-10-27 23:17
          收起回复
            有人给做了个这,但是中间一句提示错了


            6楼2014-10-27 23:31
            回复
              t1 = now
              Do
              KeyPress "1", 1
              Delay 1000*60*5
              KeyPress "2", 1
              Delay 1000*60*5
              KeyPress "3", 1
              Delay 1000*60*5
              KeyPress "4", 1
              Delay 1000*60*5
              KeyPress "5", 1
              Delay 1000*60*5
              If DateDiff("h", t1, now) = 2 Then
              t1 = now
              KeyPress "6", 1
              End If
              Loop
              这样是不是可以了?


              7楼2014-10-28 00:01
              收起回复
                算了,看楼主可怜还是帮你把
                sub KeyS()
                while(true)
                delay (1000*60) * 5
                keypress 49, 1
                delay (1000*60) * 5
                keypress 50, 1
                delay (1000*60) * 5
                keypress 51, 1
                delay (1000*60) * 5
                keypress 52, 1
                delay (1000*60) * 5
                keypress 53, 1
                wend
                end sub
                sub KeyB()
                while(true)
                delay (1000*60*60) * 2
                keypress 54, 1
                end sub
                // 在按键的开始按钮事件里放入下面语句:
                BeginThread KeyS
                BeginThread KeyB


                IP属地:新加坡8楼2014-10-28 13:38
                收起回复
                  2025-11-14 23:44:52
                  广告
                  不感兴趣
                  开通SVIP免广告
                  keyNumber = 0
                  while(true)
                  If keyNumber = 24 Then
                  keypress 53, 1
                  Delay 100
                  keypress 54, 1
                  delay (1000*60) * 5
                  keyNumber = 0
                  End If
                  keypress 49+(keyNumber Mod 5), 1
                  delay (1000*60) * 5
                  keyNumber = keyNumber + 1
                  wend


                  IP属地:浙江来自Android客户端9楼2014-10-28 15:32
                  收起回复
                    count = 0
                    keyNumber = 0
                    while(true
                    keypress 49+(keyNumber Mod 5), 1
                    delay (1000*60) * 5
                    count = count + 1
                    keyNumber = keyNumber + 1
                    If keyNumber = 24 Then
                    keypress 53, 1
                    count = 0
                    End If
                    wend


                    IP属地:浙江10楼2014-10-28 16:15
                    回复
                      count = 0
                      keyNumber = 0
                      while(true)
                      keypress 49+(keyNumber Mod 5), 1
                      delay (1000*60) * 5
                      count = count + 1
                      keyNumber = keyNumber + 1
                      If keyNumber = 24 Then
                      keypress 54, 1
                      count = 0
                      End If
                      wend


                      IP属地:浙江11楼2014-10-28 16:16
                      回复
                        Dim time1, time2,fenxhong,xiaoshi,num1,num2,i
                        time1 = time2 = Date
                        For true
                        fenzhong = DateDiff("d", time1, Now)
                        num1 = fenzhong - int(fenzhong / 5) * 5
                        xiaoshi=DateDiff("h", time2, Now)
                        num2 = xiaoshi - int(xiaoshi / 2) * 2
                        i=int(xiaoshi/2)
                        //以下 输出12345
                        Select Case num1
                        Case 0
                        KeyPress "Num 5", 1
                        Delay 60
                        Case 1
                        KeyPress "Num 1", 1
                        Delay 60
                        Case 2
                        KeyPress "Num 2", 1
                        Delay 60
                        Case 3
                        KeyPress "Num 3", 1
                        Delay 60
                        Case 4
                        KeyPress "Num 4", 1
                        Delay 60
                        End Select
                        //以下输出6
                        If num2 = 0 and i <> 0 Then
                        // i<>0用来确定时间长于1 小时
                        KeyPress "Num 6", 1
                        Delay 60
                        End If
                        Next


                        IP属地:湖北12楼2014-10-28 16:47
                        回复
                          BeginThread a
                          Rem sata
                          KeyPress "1", 1
                          Delay 300000
                          KeyPress "2", 1
                          Delay 300000
                          KeyPress "3", 1
                          Delay 300000
                          KeyPress "4", 1
                          Delay 300000
                          KeyPress "5", 1
                          Delay 300000
                          Goto sata
                          Sub a
                          Rem sata
                          KeyPress "6", 1
                          Delay 3600000
                          Goto sata
                          End Sub


                          IP属地:广东13楼2014-10-29 01:04
                          回复
                            我来帮你吧
                            i = 300
                            While true
                            If i mod 300 = 0 Then
                            KeyPress "1", 1
                            ElseIf i mod 300 = 0 Then
                            KeyPress "2", 1
                            ElseIf i mod 300 = 0 Then
                            KeyPress "3", 1
                            ElseIf i mod 300 = 0 Then
                            KeyPress "4", 1
                            ElseIf i mod 300 = 0 Then
                            KeyPress "5", 1
                            ElseIf i mod 3600= 0 Then
                            KeyPress "6", 1
                            End If
                            i = i + 1
                            Delay 1000
                            Wend


                            14楼2014-11-01 18:22
                            收起回复
                              2025-11-14 23:38:52
                              广告
                              不感兴趣
                              开通SVIP免广告
                              j = 1
                              While true
                              i = 49
                              For 5
                              KeyPress i, 1
                              i = i + 1
                              j = j + 1
                              If j = 24 Then
                              Delay 299900
                              KeyPress "6", 1
                              j = 1
                              Delay 100
                              Else
                              Delay 300000
                              End If
                              Next
                              Wend
                              不会多线程的话可以用单线程


                              15楼2014-11-01 18:50
                              回复