Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Web Coding › Could someone help me with a simple script?
New Posts  All Forums:Forum Nav:

Could someone help me with a simple script? - Page 2

post #11 of 21
Quote:
Originally Posted by Oathdynasty View Post

Whaaaaaaat.... that's totally not what I want to do! But out of curiosity, how would you do that with AutoHotkey... or do you have any good tutorials on how to do that sort of thing?
I've only used the guides on the AutoHotKey site, I don't think you can do it in the background either, you'll need to have focus on the browser I think (I'm far from an expert though). The simple method I can think of is move the mouse pointer to the first box, send a mouse click, then the text, then move to the mouse to the second box and do the same and then the third, then wait 30s and repeat.

SetKeyDelay 20, 20, play - Sometimes you need to slow it down, you may not need this or may need higher values (it's milliseconds)
TheLoop: - Sets the point to return to for the loop
SendEvent {Click X, Y} - Would click the mouse in the first box to activate it (you'd need some coordinates inside the first box)
SendPlay 1234 - would send the text "1234" to the first box
SendEvent {Click X, Y} - Would click the mouse in the Second box (you'd need some coordinates inside the Second box)
SendPlay 567 - would send the text to the second box
SendEvent {Click X, Y} - Would click the mouse in the third box (you'd need some coordinates inside the third box)
SendPlay 8910 - would send the text to the third box
SendEvent {Click X, Y} - Move the mouse to the fourth "Hello" box and click that to make the call (again need coordinates)
Sleep 30000 - waits 30 seconds (30000 milliseconds)
Goto, TheLoop - Goes back to "TheLoop" and does it again

It would loop endlessly until you stopped it, the mouse click coordinates are relative to the top-left corner of the active window unless you change that with "CoordMode", you could also activate the browser window or send to it ("WinActivate"?)(every thirty seconds it would take control of the mouse from you and perform the task) but I'd need to study and play with the commands to do that. Also, I haven't tried the above, It just looks like it should work biggrin.gif You can find help for each command Here
Not SLi any more
(18 items)
 
  
CPUMotherboardGraphicsRAM
i7 920 @ 4.0 Asus P6TD-Deluxe EVGA GTX770 SC 6GB XMS3 @1530 cas7 
Hard DriveHard DriveHard DriveOptical Drive
Intel X25-M 80GB OCZ Agility 120GB Intel X25-M 40GB LG Blue ROM DVD RW 
CoolingOSMonitorKeyboard
Water cooled w/ T-Balancer BigNG Win 7 x64 Asus PB298Q Cherry 4100L 
PowerCaseMouseMouse Pad
Corsair HX1000 MM UFO-U2 R.A.T. 7 Contagion G.L.I.D.E 9 
AudioAudio
Xonar Essence STX SR80i, DT770 or HT-R518 w/ Monitor Audio BR's 
  hide details  
Reply
Not SLi any more
(18 items)
 
  
CPUMotherboardGraphicsRAM
i7 920 @ 4.0 Asus P6TD-Deluxe EVGA GTX770 SC 6GB XMS3 @1530 cas7 
Hard DriveHard DriveHard DriveOptical Drive
Intel X25-M 80GB OCZ Agility 120GB Intel X25-M 40GB LG Blue ROM DVD RW 
CoolingOSMonitorKeyboard
Water cooled w/ T-Balancer BigNG Win 7 x64 Asus PB298Q Cherry 4100L 
PowerCaseMouseMouse Pad
Corsair HX1000 MM UFO-U2 R.A.T. 7 Contagion G.L.I.D.E 9 
AudioAudio
Xonar Essence STX SR80i, DT770 or HT-R518 w/ Monitor Audio BR's 
  hide details  
Reply
post #12 of 21
OP can let it focus on the browser inside a VM, then just minimize the VM and let it run on the background.
Quote:
Originally Posted by Darren9 View Post

I've only used the guides on the AutoHotKey site, I don't think you can do it in the background either, you'll need to have focus on the browser I think (I'm far from an expert though). The simple method I can think of is move the mouse pointer to the first box, send a mouse click, then the text, then move to the mouse to the second box and do the same and then the third, then wait 30s and repeat.
SetKeyDelay 20, 20, play - Sometimes you need to slow it down, you may not need this or may need higher values (it's milliseconds)
TheLoop: - Sets the point to return to for the loop
SendEvent {Click X, Y} - Would click the mouse in the first box to activate it (you'd need some coordinates inside the first box)
SendPlay 1234 - would send the text "1234" to the first box
SendEvent {Click X, Y} - Would click the mouse in the Second box (you'd need some coordinates inside the Second box)
SendPlay 567 - would send the text to the second box
SendEvent {Click X, Y} - Would click the mouse in the third box (you'd need some coordinates inside the third box)
SendPlay 8910 - would send the text to the third box
SendEvent {Click X, Y} - Move the mouse to the fourth "Hello" box and click that to make the call (again need coordinates)
Sleep 30000 - waits 30 seconds (30000 milliseconds)
Goto, TheLoop - Goes back to "TheLoop" and does it again
It would loop endlessly until you stopped it, the mouse click coordinates are relative to the top-left corner of the active window unless you change that with "CoordMode", you could also activate the browser window or send to it ("WinActivate"?)(every thirty seconds it would take control of the mouse from you and perform the task) but I'd need to study and play with the commands to do that. Also, I haven't tried the above, It just looks like it should work biggrin.gif You can find help for each command Here

This is basically what a macro recorder do, but you can record the events prior and then run them freely or write them down like this.
post #13 of 21
Thread Starter 
Quote:
Originally Posted by Darren9 View Post

I've only used the guides on the AutoHotKey site, I don't think you can do it in the background either, you'll need to have focus on the browser I think (I'm far from an expert though). The simple method I can think of is move the mouse pointer to the first box, send a mouse click, then the text, then move to the mouse to the second box and do the same and then the third, then wait 30s and repeat.
SetKeyDelay 20, 20, play - Sometimes you need to slow it down, you may not need this or may need higher values (it's milliseconds)
TheLoop: - Sets the point to return to for the loop
SendEvent {Click X, Y} - Would click the mouse in the first box to activate it (you'd need some coordinates inside the first box)
SendPlay 1234 - would send the text "1234" to the first box
SendEvent {Click X, Y} - Would click the mouse in the Second box (you'd need some coordinates inside the Second box)
SendPlay 567 - would send the text to the second box
SendEvent {Click X, Y} - Would click the mouse in the third box (you'd need some coordinates inside the third box)
SendPlay 8910 - would send the text to the third box
SendEvent {Click X, Y} - Move the mouse to the fourth "Hello" box and click that to make the call (again need coordinates)
Sleep 30000 - waits 30 seconds (30000 milliseconds)
Goto, TheLoop - Goes back to "TheLoop" and does it again
It would loop endlessly until you stopped it, the mouse click coordinates are relative to the top-left corner of the active window unless you change that with "CoordMode", you could also activate the browser window or send to it ("WinActivate"?)(every thirty seconds it would take control of the mouse from you and perform the task) but I'd need to study and play with the commands to do that. Also, I haven't tried the above, It just looks like it should work biggrin.gif You can find help for each command Here



Wow, thank you! I'll do some practice with this, I've always been curious about AutoHotkey
post #14 of 21
For the sake of having some fun...I may write some javscript that will do this very thing, tonight. buttkick.gif
Longterm upgrader
(19 items)
 
   
CPUMotherboardGraphicsRAM
Phenom 965 BE ASRock Fatal1ty 990FX Killer MSI R9 285 Gaming Team Xtreme 16GB 
Hard DriveHard DriveOptical DriveCooling
seagate SATA intel ssd Sony DVD Burner Corsair H110 
CoolingOSMonitorMonitor
140mm case fan x2 Windows 7 Insignia LG L1932TQ 
KeyboardPowerCaseMouse
Microsoft Natural Ergonomic 4000 OCZ 750w Fatality Fractal Design Define R4 Tt esport Talon 
Mouse PadAudio
yes Logitech 5.1 
  hide details  
Reply
Longterm upgrader
(19 items)
 
   
CPUMotherboardGraphicsRAM
Phenom 965 BE ASRock Fatal1ty 990FX Killer MSI R9 285 Gaming Team Xtreme 16GB 
Hard DriveHard DriveOptical DriveCooling
seagate SATA intel ssd Sony DVD Burner Corsair H110 
CoolingOSMonitorMonitor
140mm case fan x2 Windows 7 Insignia LG L1932TQ 
KeyboardPowerCaseMouse
Microsoft Natural Ergonomic 4000 OCZ 750w Fatality Fractal Design Define R4 Tt esport Talon 
Mouse PadAudio
yes Logitech 5.1 
  hide details  
Reply
post #15 of 21
Thread Starter 
Quote:
Originally Posted by schmotty View Post

For the sake of having some fun...I may write some javscript that will do this very thing, tonight. buttkick.gif

Well if you do, you should send me that script. I've always been interested in Java, but I've heard learning HTML is recommended first. I'm in a HTML class now, but I'd still like to learn biggrin.gif
post #16 of 21
Quote:
Originally Posted by Oathdynasty View Post

Well if you do, you should send me that script. I've always been interested in Java, but I've heard learning HTML is recommended first. I'm in a HTML class now, but I'd still like to learn biggrin.gif

Java != JavaScript smile.gif
Ol' Sandy
(28 items)
 
"Zeus"
(12 items)
 
Elite Preview
(6 items)
 
CPUMotherboardGraphicsRAM
Intel Xeon E3-1230v3 Gigabyte GA-Z97X-UD5H-BK MSI Gaming GTX 980 Kingston 32GB (4x8) 
Hard DriveHard DriveHard DriveHard Drive
Plextor PX-256M5S 256GB Samsung EVO 1TB Hitachi HDS721010CLA332 Hitachi HDS723020BLA642 
Hard DriveHard DriveHard DriveOptical Drive
Hitachi HDS723020BLA642 Hitachi HUA722010CLA330 WDC WD10EARS-00Z5B1 TSSTcorp CDDVDW SH-S223B 
CoolingCoolingOSMonitor
Phanteks PH-TC14PE with TY-140's Lamptron FCv5 (x2) Windows 8 Pro 64-bit Dell U2412M 
MonitorMonitorMonitorKeyboard
Dell U2412M Dell U2212HM Dell U2713HM Topre Realforce 87UB | Ducky DK9087 G2 Pro 
PowerCaseMouseMouse Pad
Corsair AX-750 Corsair Obsidian 650D Logitech G700 XTRAC Ripper XXL 
AudioAudioAudioAudio
Beyerdynamic DT-770 Pro 250ohm Schiit Bifrost DAC Schiit Asgard 2 HiVi Swan M50W 2.1 
CPUMotherboardRAMHard Drive
Intel Xeon E5-2620 Super Micro X9SRL-F-B 128GB 1333MHz LSI 9271-8i 
OSPowerCase
VMware ESXi 5.5 SeaSonic SS-400FL2 Fractal Define R3 
CPUMotherboardGraphicsRAM
Intel Core i5-3437U HP EliteBook Folio 9470m  Intel HD Graphics 4000  16GB DDR3 SDRAM 
Hard DriveOS
256GB SSD Windows 10 Insider Preview 
  hide details  
Reply
Ol' Sandy
(28 items)
 
"Zeus"
(12 items)
 
Elite Preview
(6 items)
 
CPUMotherboardGraphicsRAM
Intel Xeon E3-1230v3 Gigabyte GA-Z97X-UD5H-BK MSI Gaming GTX 980 Kingston 32GB (4x8) 
Hard DriveHard DriveHard DriveHard Drive
Plextor PX-256M5S 256GB Samsung EVO 1TB Hitachi HDS721010CLA332 Hitachi HDS723020BLA642 
Hard DriveHard DriveHard DriveOptical Drive
Hitachi HDS723020BLA642 Hitachi HUA722010CLA330 WDC WD10EARS-00Z5B1 TSSTcorp CDDVDW SH-S223B 
CoolingCoolingOSMonitor
Phanteks PH-TC14PE with TY-140's Lamptron FCv5 (x2) Windows 8 Pro 64-bit Dell U2412M 
MonitorMonitorMonitorKeyboard
Dell U2412M Dell U2212HM Dell U2713HM Topre Realforce 87UB | Ducky DK9087 G2 Pro 
PowerCaseMouseMouse Pad
Corsair AX-750 Corsair Obsidian 650D Logitech G700 XTRAC Ripper XXL 
AudioAudioAudioAudio
Beyerdynamic DT-770 Pro 250ohm Schiit Bifrost DAC Schiit Asgard 2 HiVi Swan M50W 2.1 
CPUMotherboardRAMHard Drive
Intel Xeon E5-2620 Super Micro X9SRL-F-B 128GB 1333MHz LSI 9271-8i 
OSPowerCase
VMware ESXi 5.5 SeaSonic SS-400FL2 Fractal Define R3 
CPUMotherboardGraphicsRAM
Intel Core i5-3437U HP EliteBook Folio 9470m  Intel HD Graphics 4000  16GB DDR3 SDRAM 
Hard DriveOS
256GB SSD Windows 10 Insider Preview 
  hide details  
Reply
post #17 of 21
Thread Starter 
Quote:
Originally Posted by tompsonn View Post

Java != JavaScript smile.gif

Yeah yeah, I was hoping you'd know what I mean tongue.gif
post #18 of 21
I would use AutoIt over AutoHotKey, as AutoHotKey is a discontinued project that is copied from a old version of the AutoIt code base. You probably could just send a header to the server to accomplish this without ever having to use a web browser.
Main Rig
(14 items)
 
Linux Rig
(10 items)
 
 
CPUMotherboardGraphicsRAM
Athlon II x3 450 Biostar A880GZ PowerColor HD 4650 DDR3 4GB Samsung MV-3V2G3/US 
Hard DriveOptical DriveCoolingOS
Samsung 830 128GB (Pending) ASUS DRW-24B1ST Stock Windows 8 Enterprise x64 
KeyboardPowerCaseMouse
Logitech Classic 200 300w Hipro a1410n HP 1000 DPI 
Mouse PadAudio
Standard Realtek ALC662 
CPUMotherboardGraphicsRAM
AMD Sempron 3000+ ASUS A7V8X-LA VIA KM400A 2GB DDR 333 
Hard DriveOptical DriveCoolingOS
40GB Seagate Barracuda 7200.7 Samsung Writemaster Stock ASUS Ubuntu 12.04 
PowerCase
Hipro 250W SR1500NX 
  hide details  
Reply
Main Rig
(14 items)
 
Linux Rig
(10 items)
 
 
CPUMotherboardGraphicsRAM
Athlon II x3 450 Biostar A880GZ PowerColor HD 4650 DDR3 4GB Samsung MV-3V2G3/US 
Hard DriveOptical DriveCoolingOS
Samsung 830 128GB (Pending) ASUS DRW-24B1ST Stock Windows 8 Enterprise x64 
KeyboardPowerCaseMouse
Logitech Classic 200 300w Hipro a1410n HP 1000 DPI 
Mouse PadAudio
Standard Realtek ALC662 
CPUMotherboardGraphicsRAM
AMD Sempron 3000+ ASUS A7V8X-LA VIA KM400A 2GB DDR 333 
Hard DriveOptical DriveCoolingOS
40GB Seagate Barracuda 7200.7 Samsung Writemaster Stock ASUS Ubuntu 12.04 
PowerCase
Hipro 250W SR1500NX 
  hide details  
Reply
post #19 of 21
I got distracted messing with my overclock tonight, so maybe tomorrow night.
Longterm upgrader
(19 items)
 
   
CPUMotherboardGraphicsRAM
Phenom 965 BE ASRock Fatal1ty 990FX Killer MSI R9 285 Gaming Team Xtreme 16GB 
Hard DriveHard DriveOptical DriveCooling
seagate SATA intel ssd Sony DVD Burner Corsair H110 
CoolingOSMonitorMonitor
140mm case fan x2 Windows 7 Insignia LG L1932TQ 
KeyboardPowerCaseMouse
Microsoft Natural Ergonomic 4000 OCZ 750w Fatality Fractal Design Define R4 Tt esport Talon 
Mouse PadAudio
yes Logitech 5.1 
  hide details  
Reply
Longterm upgrader
(19 items)
 
   
CPUMotherboardGraphicsRAM
Phenom 965 BE ASRock Fatal1ty 990FX Killer MSI R9 285 Gaming Team Xtreme 16GB 
Hard DriveHard DriveOptical DriveCooling
seagate SATA intel ssd Sony DVD Burner Corsair H110 
CoolingOSMonitorMonitor
140mm case fan x2 Windows 7 Insignia LG L1932TQ 
KeyboardPowerCaseMouse
Microsoft Natural Ergonomic 4000 OCZ 750w Fatality Fractal Design Define R4 Tt esport Talon 
Mouse PadAudio
yes Logitech 5.1 
  hide details  
Reply
post #20 of 21
Like I said, you can just send the header and wait for server response. You would get a way more effective call spammer this way. Or if your using it to call yourself at certain times to remind you to do something, you could just code in timers to trigger the header being sent at them times.
Code:
POST / HTTP/1.1
Host: www.icantfindmyphone.com
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:18.0) Gecko/18.0 Firefox/18.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: http://www.icantfindmyphone.com/
Cookie: _Removed_
Connection: keep-alive
Content-Type: application/x-www-form-urlencoded
Content-Length: 55
areaCode=137&firstThree=137&lastFour=1337&countryCode=1

Edited by Warmonger - 9/18/12 at 10:07pm
Main Rig
(14 items)
 
Linux Rig
(10 items)
 
 
CPUMotherboardGraphicsRAM
Athlon II x3 450 Biostar A880GZ PowerColor HD 4650 DDR3 4GB Samsung MV-3V2G3/US 
Hard DriveOptical DriveCoolingOS
Samsung 830 128GB (Pending) ASUS DRW-24B1ST Stock Windows 8 Enterprise x64 
KeyboardPowerCaseMouse
Logitech Classic 200 300w Hipro a1410n HP 1000 DPI 
Mouse PadAudio
Standard Realtek ALC662 
CPUMotherboardGraphicsRAM
AMD Sempron 3000+ ASUS A7V8X-LA VIA KM400A 2GB DDR 333 
Hard DriveOptical DriveCoolingOS
40GB Seagate Barracuda 7200.7 Samsung Writemaster Stock ASUS Ubuntu 12.04 
PowerCase
Hipro 250W SR1500NX 
  hide details  
Reply
Main Rig
(14 items)
 
Linux Rig
(10 items)
 
 
CPUMotherboardGraphicsRAM
Athlon II x3 450 Biostar A880GZ PowerColor HD 4650 DDR3 4GB Samsung MV-3V2G3/US 
Hard DriveOptical DriveCoolingOS
Samsung 830 128GB (Pending) ASUS DRW-24B1ST Stock Windows 8 Enterprise x64 
KeyboardPowerCaseMouse
Logitech Classic 200 300w Hipro a1410n HP 1000 DPI 
Mouse PadAudio
Standard Realtek ALC662 
CPUMotherboardGraphicsRAM
AMD Sempron 3000+ ASUS A7V8X-LA VIA KM400A 2GB DDR 333 
Hard DriveOptical DriveCoolingOS
40GB Seagate Barracuda 7200.7 Samsung Writemaster Stock ASUS Ubuntu 12.04 
PowerCase
Hipro 250W SR1500NX 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Web Coding
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Web Coding › Could someone help me with a simple script?