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
For Games
(18 items)
 
  
CPUMotherboardGraphicsRAM
i7 920 @ 4.0 Asus P6TD-Deluxe Asus GTX480 SLI (840/1950 Bios) 6GB XMS3 @1530 cas7 
Hard DriveHard DriveHard DriveOptical Drive
Intel X25-M 80GB OCZ Agility 120GB WD Black 1TB LG Blue ROM DVD RW 
CoolingOSMonitorKeyboard
Water cooled w/ T-Balancer BigNG Win 7 x64 2x Dell Ultra-sharp 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
For Games
(18 items)
 
  
CPUMotherboardGraphicsRAM
i7 920 @ 4.0 Asus P6TD-Deluxe Asus GTX480 SLI (840/1950 Bios) 6GB XMS3 @1530 cas7 
Hard DriveHard DriveHard DriveOptical Drive
Intel X25-M 80GB OCZ Agility 120GB WD Black 1TB LG Blue ROM DVD RW 
CoolingOSMonitorKeyboard
Water cooled w/ T-Balancer BigNG Win 7 x64 2x Dell Ultra-sharp 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.
    
CPUMotherboardGraphicsRAM
i5 750 @ 3.6 P7P55 EVO Gtx 670 DC2T 8gb @1600 cas 9 @1.5v 
Hard DriveOptical DriveCoolingOS
crucial m4 256gb + 3tb seagate none venomous-X + 2 P/P yate loons @5v 8 pro x64 + mint 14 cinnamon x32 
MonitorKeyboardPowerCase
PX2370 random Antec HPC-850 BX-500 aerocool 
MouseMouse PadAudio
CM Storm Spawn QcK+ Shure SRH 750DJ+FiiO E5 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
i5 750 @ 3.6 P7P55 EVO Gtx 670 DC2T 8gb @1600 cas 9 @1.5v 
Hard DriveOptical DriveCoolingOS
crucial m4 256gb + 3tb seagate none venomous-X + 2 P/P yate loons @5v 8 pro x64 + mint 14 cinnamon x32 
MonitorKeyboardPowerCase
PX2370 random Antec HPC-850 BX-500 aerocool 
MouseMouse PadAudio
CM Storm Spawn QcK+ Shure SRH 750DJ+FiiO E5 
  hide details  
Reply
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
(14 items)
 
   
CPUMotherboardGraphicsRAM
Phenom 965 BE Asus M3N78 Pro MSI Geforce 460gtx 1GB Cyclone OCZ SLI DDR2-6400 
RAMHard DriveCoolingCooling
OCZ reaper seagate SATA ThermalTake V1 RocketFish 120mm case fan x2 
CoolingOSMonitorPower
Dynex 80mm case fan x2 Vista 64 Business LG Ultra LS600 
CaseAudio
Ultra X-Blaster Logitech 5.1 
  hide details  
Reply
Longterm upgrader
(14 items)
 
   
CPUMotherboardGraphicsRAM
Phenom 965 BE Asus M3N78 Pro MSI Geforce 460gtx 1GB Cyclone OCZ SLI DDR2-6400 
RAMHard DriveCoolingCooling
OCZ reaper seagate SATA ThermalTake V1 RocketFish 120mm case fan x2 
CoolingOSMonitorPower
Dynex 80mm case fan x2 Vista 64 Business LG Ultra LS600 
CaseAudio
Ultra X-Blaster 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
My System
(30 items)
 
"Zeus"
(13 items)
 
 
CPUMotherboardGraphicsRAM
Intel Core i5 2500K (4.5ghz @ 1.320v) Gigabyte Z68X-UD3R-B3 MSI R7970 Lightning Corsair 16GB (4x4GB) 
Hard DriveHard DriveHard DriveHard Drive
Plextor PX-256M5S 256GB Crucial M4 128GB 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 7 Ultimate 64-bit Dell U2412M 
MonitorMonitorMonitorKeyboard
Dell U2412M Dell U2212HM Dell U2212HM Ducky DK9087 G2 Pro 
PowerCaseMouseMouse Pad
Corsair AX-750 Corsair Obsidian 650D Microsoft IntelliMouse Optical  XTRAC Ripper XXL 
AudioAudioAudioAudio
Westone W3 IEMs RE-272 IEMs Shure SE-215 IEMs Schiit Bifrost DAC 
AudioAudio
Schiit Asgard 2 amp HiVi Swan M50W 2.1 
CPUMotherboardGraphicsRAM
Intel Core i7 950 GA-X58-UD3R Radeon HD 5450  24GB Corsair @ 1333mhz 
Hard DriveOSPowerCase
4x WD Cavair Red 1TB in RAID 0 Windows Server 2008 R2 x64 Corsair HX-520 LianLi LanCool 
  hide details  
Reply
My System
(30 items)
 
"Zeus"
(13 items)
 
 
CPUMotherboardGraphicsRAM
Intel Core i5 2500K (4.5ghz @ 1.320v) Gigabyte Z68X-UD3R-B3 MSI R7970 Lightning Corsair 16GB (4x4GB) 
Hard DriveHard DriveHard DriveHard Drive
Plextor PX-256M5S 256GB Crucial M4 128GB 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 7 Ultimate 64-bit Dell U2412M 
MonitorMonitorMonitorKeyboard
Dell U2412M Dell U2212HM Dell U2212HM Ducky DK9087 G2 Pro 
PowerCaseMouseMouse Pad
Corsair AX-750 Corsair Obsidian 650D Microsoft IntelliMouse Optical  XTRAC Ripper XXL 
AudioAudioAudioAudio
Westone W3 IEMs RE-272 IEMs Shure SE-215 IEMs Schiit Bifrost DAC 
AudioAudio
Schiit Asgard 2 amp HiVi Swan M50W 2.1 
CPUMotherboardGraphicsRAM
Intel Core i7 950 GA-X58-UD3R Radeon HD 5450  24GB Corsair @ 1333mhz 
Hard DriveOSPowerCase
4x WD Cavair Red 1TB in RAID 0 Windows Server 2008 R2 x64 Corsair HX-520 LianLi LanCool 
  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
(14 items)
 
   
CPUMotherboardGraphicsRAM
Phenom 965 BE Asus M3N78 Pro MSI Geforce 460gtx 1GB Cyclone OCZ SLI DDR2-6400 
RAMHard DriveCoolingCooling
OCZ reaper seagate SATA ThermalTake V1 RocketFish 120mm case fan x2 
CoolingOSMonitorPower
Dynex 80mm case fan x2 Vista 64 Business LG Ultra LS600 
CaseAudio
Ultra X-Blaster Logitech 5.1 
  hide details  
Reply
Longterm upgrader
(14 items)
 
   
CPUMotherboardGraphicsRAM
Phenom 965 BE Asus M3N78 Pro MSI Geforce 460gtx 1GB Cyclone OCZ SLI DDR2-6400 
RAMHard DriveCoolingCooling
OCZ reaper seagate SATA ThermalTake V1 RocketFish 120mm case fan x2 
CoolingOSMonitorPower
Dynex 80mm case fan x2 Vista 64 Business LG Ultra LS600 
CaseAudio
Ultra X-Blaster 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?