473,395 Members | 1,653 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

noob needs help

hey im trying to make something so it presses spacebar in game for me so i don't have to. i previously got this from somewhere else and tried to change it so it worked with the game i started playing.

here is the first script

'-----------------
intHighNumber = 10
intLowNumber = 5
x = 0
wow="World of Warcraft"

Set ws = WScript.CreateObject("Wscript.Shell")
ws.AppActivate wow
buff_timer1=Timer
While x < 100
Randomize
y = Int((intHighNumber - intLowNumber + 1) * Rnd + intLowNumber)
ws.AppActivate wow
ws.Sendkeys ("e")
' x = x+1
buff_timer2=Timer
If buff_timer2-buff_timer1 >= 500 Then
ws.AppActivate wow
ws.Sendkeys ("q")
Else
End If
WScript.Sleep(y*1000)
Wend
'--------------------

okay everything works fine with that and so i try to change it so spacebar gets pressed and more often but i come to a problem. first the script

The script i tried making off of the first one

'-----------------
intHighNumber = 10
intLowNumber = 5
x = 0
mu="Mu"

Set ms = MScript.CreateObject("Mscript.Shell")
ms.AppActivate mu
buff_timer1=Timer
While x < 25
Randomize
y = Int((intHighNumber - intLowNumber + 1) * Rnd + intLowNumber)
ms.AppActivate mu
ms.Sendkeys (" ")
' x = x+1
buff_timer2=Timer
If buff_timer2-buff_timer1 >= 125 Then
ms.AppActivate mu
ms.Sendkeys (" ")
Else
End If
MScript.Sleep(y*250)
Mend
'--------------------

now when i run it, it does this

Windows Script Host
Script: C:\Documents and Settings\Default\Desktop\loot.vbs
Line: 24
Char: 22
Error: Expected 'Wend'
Code 800A03FA
Source: Microsoft VBScript compilation error

i tried doing some stuff but nothing works, can anyone help me?>
Jun 6 '06 #1
1 1620
BSOB
77
i dont know your specific application, but i am suspicious of the "mu" part. app activate sends focus to the application with the argument's title. Are you sure windows recognized the game as "Mu"? a way to see what windows "calls" the game is to do a control alt delete and find the task title of it. If it isnt Mu then that is your problem, everything else looks clean.
Jul 15 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Justin Koivisto | last post by:
OK, out of my element here once again... I want a query (or something I can use as a record source for a report) to do the following: * look in 2 tables (one field each) to find all entered...
10
by: stylecomputers | last post by:
Hey guys, I am absolutely new to Linux programming, with no w######s programming experience except a small amount of C++ console apps. Reasonably new to Linux, BSD etc, got good sound networking...
9
by: davetelling | last post by:
I am not a programmer, I'm an engineer trying to make an interface to a product I'm designing. I have used C# to make a form that interrogates the unit via the serial port and receives the data. I...
2
by: Link360 | last post by:
Im a complete noob and im proud of it. I am excited in learning everything about the C++ language. Right now im trying to make tic-tac-toe. Go ahead laugh. here is what i have so far ...
1
by: Velvet | last post by:
I keep getting this error: Could not find the sitemap node with URL '~/Web.sitemap'. I have a master page that has a menu control and a SiteMapDataSource on it. <asp:Menu ID="Menu1"...
5
by: Hydrogenfussion | last post by:
Hello and thank you for reading this. I have just started to learn C++ from www.cprogramming.com,its a great site! But i do not understand some of the terms. I am using Dev-C++. Can you tell me...
2
by: athos | last post by:
OS: Windows 2000/XP (needs to run on 2 different machines) Language: Python 2.5 Programmer Level: Pathetically new to Python Goal: Using code I've altered for my needs, I'm attempting to create...
1
by: Fluffy654 | last post by:
First off I am a complete noob when it comes to doing anything with servers. I'm just beginning to learn today because I need to start adding SSI to my websites. I apologise in advance if I am making...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.