C++ :: Program To Print Out X / Y Click Coordinates?

Jan 16, 2013

I use the AS/400 warehouse system, and I need to be able to automate typing one letter in several different locations to speed things up.

My thoughts are:
1. Find out how to make a program that will determine x, y coordinates of mouseclicks, and then use software to use macros to change information.
2. Build a program that will complete a single process by repeating set mouse clicks and keystrokes.

We recieve HUGE transfers from a warehouse across the country, and have to change the first character of the name of bin locations - and after a few pages it gets VERY tedious.

View 4 Replies


ADVERTISEMENT

C++ :: How To Enter And Print X And Y Coordinates On One Line Separated By Comma

Nov 22, 2014

I'm trying to enter an 'x' and 'y' coordinate on only one line separated by a comma. But I keep getting a syntax error. Here are the lines of code I'm using. This has to be simple. What am I doing wrong with this code?

Code:
cout<< "Please enter the x and the y coordinates of the first point,"<<endl;
cout<< "use a comma to separate them. " <<endl<<endl;
cin>> "You entered: " >>x1>>",">> y1 >>"for the first point" >>endl;

View 7 Replies View Related

C :: Program To Read In A Tab Deliminated Text File Of Xyz Coordinates

Nov 14, 2013

I have been working on a program to read in a tab deliminated text file of xyz coordinates of atoms/particles and store the values in three seperate arrays. This is my code so far:

Code:

#include<stdio.h>
#include<stdlib.h>
void fileinput(FILE *ifp) {
int N, column, atom;
int c;
column = 1;

[Code]...

Supposedly this should assign the values in the text file to the cooresponding arrays but when I run the code on a simple test file all I get is:

Code:

$ ./input.o -i ./test.txt
Atom one coodinates x 0.000000, y 0.000000, and z 0.000000 Where test.txt is: Code: 1.0000 2.000 1.5
3.0000 5.000 1.4
4.0000 3.000 1.3

View 1 Replies View Related

C++ :: How To Impose A Boundary To Stop Program Creating Coordinates

Mar 21, 2013

I am writing a program which creates a set of coordinates that when plotted will reveal a syastro crescent moon character. If you imagine plotting a crescent moon as two circles with different radius, where the overlap will create the shape. The problem I am having is how to just plot where they overlap ( ie the crescent moon part) and no the rest of the circles. How can I impose a boundary to stop the program creating coordinates I dont want. My first attempt is an if else loop.

View 1 Replies View Related

C++ :: Tile Mapping Program - Loop Through All Tiles In Game Setting X And Y Coordinates

Jun 6, 2013

void create_map(){

int x = 0;
int y = 0;
while (y >= 15) {
game_map[x][y].pos_x = x * tile_size;
game_map[x][y].pos_y = y * tile_size;

Objective of the code: to loop through all tiles in the game, setting their X and Y coordinates.

It just doesn't do anything at all. No error message.

View 12 Replies View Related

C# :: Getting Coordinates Inside Image

Feb 25, 2014

I am working on a small game and I have the following problem. I need to get the colour of a particular position in an image. Say I'm given coordinates (5,5) I need the colour of the part in the image. I think I can do the colour picking myself, but I don't know how to point at coordinates inside the image.

View 3 Replies View Related

C/C++ :: MFC - Button With Right Click Events?

May 23, 2012

How to use button with right click events in mfc?

View 1 Replies View Related

C :: Function That Scans In Two Sets Of Coordinates

Nov 5, 2013

Night now I'm working on part of a function that scans in two sets of coordinates. Is there a way I can scan both sets of coordinates in with the same scanf?

ex. scanf("%d%d%d%d," &destroyer_1, &destroyer_2, &destroyer_3, &destroyer_4)

but that didn't work...

Code:
printf("What are the first coordinates for destroyer:
");
scanf_s("%d%d", &destroyer_1, &destroyer_2);
gameboard[destroyer_1][destroyer_2] = 'd';
printf("What are the second coordinates for destroyer:

[Code] .....

View 5 Replies View Related

C++ :: How To Find Coordinates Of Cursor Position

Feb 4, 2014

I have studied function,array,stuctures,flow of control(XI class cbse syllabus). Now I want to know how to find coordinates of cursor position in c++.

View 2 Replies View Related

C++ :: Finding Coordinates In Multidimensional Array?

Mar 26, 2013

I know how to find a specific number in a multidimensional array, but I don't know how to have a specific number and find its coordinates.

View 2 Replies View Related

C++ :: Finding Area And Perimeter Of Given Coordinates

Dec 10, 2014

Below is what i have so far. My main issue is outputting the area and perimeter of the given coordinates as i need the final coordinate to connect up to the first coordinate. I've tried doing that using numberOfcorners but it says "the expression must have integral or enum type"

#define _USE_MATH_DEFINES
#include <iostream>
#include <cmath>
#include <math.h>
using namespace std;
int main() {

float ArrayX[10];
float ArrayY[10];
float numberOfcorners;

[Code] .....

View 3 Replies View Related

C++ :: Mouse Input Coordinates Not Being Read

Jan 14, 2015

Essentially the problem is that when I click the mouse, the program doesn't seem to record the coordinates. So the if statements are never executed. The problem could also be with the if statements, I'm not sure.

One thing I noticed was that when the do while loop is running and the left mouse button is not pressed then X and Y of dwMousePosition are both 0. But then if I press the left mouse button then the coordinates become x = 1 and y = 0.

NOTE I'm on Windows 7, 64 bit, using Visual Studio Express 2013 for Windows Desktop

#include <iostream>
#include <windows.h>
#include <string>
#include <new>
#include <stdio.h>
using namespace std;
INPUT_RECORD ir[128];
DWORD nRead;

[Code] .....

View 1 Replies View Related

C/C++ :: Reading X / Y Coordinates In Text File

Apr 7, 2014

I need to read x,y coordinates in text file using c++. The name of file is input.txt which is,

x      y
232.1,753.7
100.5,981.6
96.2,992.9
148.7,953.2
197.2,999.3
249.9,998.6
261.7,975.9
262.4,905.8
334.9,980.8
371.6,979.4
396.7,996.3
405.1,995
565.5,766
459.4,988.5
474.4,994.6
594.6,996.8
604,987.3
612.8,877.3
664.1,992.6

#include <iostream>
#include <fstream>
using namespace std  
struct monsters_struct {
int x, y;

[Code] ....

View 1 Replies View Related

C++ ::  can't Get Program To Print Only Available Seats

May 1, 2014

I can't get my program to print only AVAILABLE SEATS; instead it prints Both Available and Taken.

//Program allows you to delete and add seats to the Airplane. Also to upload seat settings as a text file.
#include <iostream>
#include <fstream> //file stream for text file
#include <string>
using namespace std;

[code].....

View 6 Replies View Related

C++ :: A Program To Print Big Letters?

Nov 28, 2013

I need help writing a program where I use small letter to write names in Big letters. (I dont know if you understand what i mean). Follow link to description.

[URL]

View 6 Replies View Related

C++ :: Program To Print Sum Of Even And Odd Numbers

Apr 14, 2013

I am writing a program that prints the sum of even and odd numbers and here is my code

#include <iostream>
using namespace std;
const int SENTINEL = -999;

int main() {
int integers = 0;
int even = 0;
int odd = 0;

[Code] ....

Nut now in the output it adds -999 to the odd numbers ....

View 3 Replies View Related

C# :: Add A Column Dynamically On Button Click?

Apr 30, 2014

i am using c# asp.net'

var db = Simple.Data.Database.OpenNamedConnection("sqlConn");
DataTable dt = gridRatingEventHistory.DataSource as DataTable;
string dateString = DateTime.Now.ToShortDateString();
dt.Columns.Add(dateString);
gridRatingEventHistory.Columns.Add(new GridBoundColumn {

[Code] .....

if you look at 1st image 1 you can see what it looks like -- when i hit the button i just want a blank column to show next to the last column however i get image 2 results how can i fix this.

View 3 Replies View Related

C# :: Multiple Pages On WPF Button Click

Oct 24, 2014

For now the app creates a new DateTime property which is binded to a label and shows the user the current time. Eventually I want to have the ability to select the timezone you are in, change font/background colors/etc etc... But that is all in time. My current step that I am trying to implement is having a button click (Binded to an event method) change screens. I find it hard to explain in words, but I would like the same Window to be used, just have different functions on the other when the button is clicked. So for example...

The only way I have found to do this so far is to create a whole new form or create tabs. While those are all good and have their place. I know that I need to start breaking up my code into classes, I am developing a bad habit throwing everything into the MainWindow Class...

Here is the code if needed:

XAML:

<Window x:Class="ClockApp.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Name="MyWindow"
Title="Alarm Clock App" Height="180" Width="360" Visibility="Visible" ResizeMode="NoResize" WindowStyle="ToolWindow">

[Code] ....

View 6 Replies View Related

C :: Drawing A Box With Coordinates - Printing Between Certain ASCII Values

Sep 23, 2014

The assignment is:

1) Write a program that asks the user for a a single character and two XY coordinates. The two X and two Y values should all be integers between 0 and 50. The character should be a printable ASCII character with values between and including ' !' (ascii value 33) and '~' (ascii value 126).

2) Your program should then draw a rectangle made up of the user selected character where the upper left corner is at X1; Y 1 and the lower right corner is at X2; Y2. Be sure to print the appropriate number of blank lines (having spaces in the blank rows is OK) in the beginning and pad each row of your rectangle with X1 leading spaces.

The Output is supposed to be similar to this:

(X1,Y1) = (0,0) , (X2,Y2) = (4,4), the character = ^

^^^^
^^^^
^^^^
^^^^

What I am having trouble understanding is printing between certain ASCII values (ASCII has never been discussed in class).

Another thing I am having trouble with is the main part of the assignment. From what we are currently discussing is loops and the assignment is covering nested loops. My code looks similar to this:
Code:

#include <stdio.h>
int main (void) {
int X1, Y1, X2, Y2;
char cRec;
printf("Enter a character: ");
scanf("%c", &cRec);

[Code] .....

My thinking on the assignment is that you want the X1 coordinate to increase to the value of X2 (same for Y1 and Y2). Is this thinking wrong?

View 12 Replies View Related

C++ :: How To Update Coordinates To Move It Towards Center And Then Nuclei

Jan 22, 2013

I have created a sphere, inside the sphere (cell) is another smaller sphere (nuclei) located at one end and at the other end of the sphere is a structure call microtubules.The microtubules had a center point and then there are line that extend from the point to the edge of nuclei and also to the edge of the cell.

I have points (viruses) that move throughout the cell. Once the virus is on the microtubules structure ( assuming it attaches to the structure from the cell edge), it must move towards the center of the microtubules and eventually move down the line towards the nuclei.

I have already figured out how to determine if the virus is on the microtubules structure however I cant figure out how to move it down the line. I figured it out in 2D space using the quadrant system, but I cant wrap my head doing it in 3D space.Once the virus is on the microtubules how do I update the coordinates to move it towards the center and then towards the nuclei?

View 3 Replies View Related

C++ :: Display Position Of Point In Polar Coordinates

Apr 2, 2013

Write a program that prompts the user for the x and y coordinates of a point on the x-y plane, and then displays the position of that point in polar coordinates.

The program must execute via a function ‘polar’ that is called from the main function. This function accepts x & y coordinates as input value parameters, and then returns, through reference parameters, the polar coordinate position of the point (r and theta).

Could in theory be written entirely in the main function; however, to meet the problem statement the code must include a user defined function that returns polar coordinates to the main function via reference parameters.

Some programming hints:

(i)Reference parameters are declared using an ampersand after the declaration type: for example – ‘int& number’ declares a reference parameter ‘number’ of type ‘integer’.

(ii)You’ll need the cmath library for arctan and sqrt functions. The C++ syntax for the arctan function is “atan(x)”.

(iii)The C++ arctan function returns an angle in radians. For output to the screen convert the angle theta from radians to degrees.

(iv)Program should work for x, y values in all four quadrants of the x-y plane.

View 4 Replies View Related

C++ :: How To Rotate Single 3D Object By Modifying Its Coordinates

Jun 20, 2014

I would like to understand how to rotate a 3D Object around it's Center, by modifying it's Vertex Coordinates. N

The reason is that I need to keep track of the new coordinates because of my collision system, which is based on Vertex Coords.

Here is the Code for an Object

void DrawHouse(GLfloat x1, GLfloat x2, GLfloat y1, GLfloat y2,
GLfloat z1,GLfloat z2, GLfloat u1, GLfloat u2, GLfloat v1, GLfloat v2, GLuint textid) {
glBindTexture(GL_TEXTURE_2D, textid);
glBegin(GL_TRIANGLES);
glNormal3f( 0.0f, 0.0f, 1.0f);
glTexCoord2f(u1,v1); glVertex3f(x1,y1,z2);

[code]....

View 7 Replies View Related

Visual C++ :: Mouse Input Coordinates Not Being Read

Jan 14, 2015

When I click the mouse, the program doesn't seem to record the coordinates. So the if statements are never executed. One thing I noticed was that when the do while loop is running and the left mouse button is not pressed then X and Y of dwMousePosition are both 0. But then if I press the left mouse button then the coordinates become x = 1 and y = 0.

I am on Windows 7, 64 bit, using Visual Studio Express 2013 for Windows Desktop

Code:
#include <iostream>
#include <windows.h>
#include <string>
#include <new>
#include <stdio.h>
using namespace std;
INPUT_RECORD ir[128];

[Code] ....

View 1 Replies View Related

C :: Program To Print The Length Of A String

Oct 20, 2013

Well what the title says, but I can't get it done. This is what I got

Code:
#include <stdio.h>#include <string.h>
int main(void)
{
char word;
int count;
printf("Enter a word.

[Code] ....

View 4 Replies View Related

C :: Program To Print Letters In Given Notation

Feb 11, 2014

I have to develop script in C to print the alphabets in given notation.

Please check the attachment.

View 4 Replies View Related

C++ :: Print Asterisks To Correspond To Program

Mar 16, 2014

i have to make two functions one recursion that ask the user to enter number of rows and i use recursion to tell him how many pins there are ex. user enters 5 there are 15 pins. I did this function now i need a function that prints an asterisk triangle for my recursion function so for 15 it should look like this

*
* *
* * *
* * * *
* * * * *

i tried many times but can't make it descend like that i can only get like a right triangle..the hard part is that it goes with the users number so if they enter 3 for example it should be 3 rows.

int pins(int n){
if(n==0){
return 0;

[code]....

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved