Search found 295 matches

by masheen
15 Oct 2019, 07:31
Forum: Ask For Help
Topic: PostMessage MAKEWPARAM 5 param
Replies: 1
Views: 257

PostMessage MAKEWPARAM 5 param

Try to do this:
Image

Code:

Code: Select all

WPARAM wParam = MAKEWPARAM(MK_LBUTTON, MK_RBUTTON, VK_SHIFT, VK_CONTROL, MK_MBUTTON);
PostMessage(hWnd, WM_MOUSEMOVE, wParam, MAKELPARAM(0, 0));
Get this:
Image

Anybody know how to fix it?
by masheen
11 Apr 2018, 14:27
Forum: Ask For Help
Topic: Easy Questions about expressions Topic is solved
Replies: 8
Views: 1964

Re: Easy Questions about expressions Topic is solved

How to reduce the expression?

Code: Select all

if(p = 1 and p = 2){
	...
}

Code: Select all

while 1{
    if (A_index = 1,5){ ; if a_index = 1 or a_index = 5
    
        MsgBox, % A_index ;want 1 then 5 dont work
    }
}
by masheen
06 Apr 2018, 02:31
Forum: Ask For Help
Topic: Questin about arrays
Replies: 1
Views: 584

Questin about arrays

Plz help. I have array with coordinates. Array := [] Array[1,1] := 4844.2578125000 ;x Array[1,2] := 4740.5839843750 ;y Array[2,1] := 4905.8173828125 ;x Array[2,2] := 4721.2353515625 ;y Array[3,1] := 4860.1962890625 ;x Array[3,2] := 4724.5092773438 ;y Array[4,1] := 4893.0820312500 ;x Array[4,2] := 47...
by masheen
04 Apr 2018, 06:11
Forum: Ask For Help
Topic: Question about Coord System Topic is solved
Replies: 12
Views: 2599

Re: Question about Coord System Topic is solved

wolf_II wrote:After you adjuste...
It's a little different than what you showed, but thank you so much for the idea. Need AngleBetween * Direction.
Image
by masheen
01 Apr 2018, 09:54
Forum: Ask For Help
Topic: How to expresison on sting Topic is solved
Replies: 4
Views: 1243

Re: How to expresison on sting Topic is solved

Renz wrote:Try this

Code: Select all

(result := (3.324 - 0.624) * 180 / Pi) > 180 ? result *= -1:""
wrong
by masheen
01 Apr 2018, 09:22
Forum: Ask For Help
Topic: How to expresison on sting Topic is solved
Replies: 4
Views: 1243

How to expresison on sting Topic is solved

How to do one line:

Code: Select all

result = (3.324 - 0.624) * 180 / Pi
IF result > 180
	result *= -1
Dont work

Code: Select all

result := (3.324 - 0.624) * 180 / Pi > 180 ? *-1 : *1
by masheen
01 Apr 2018, 00:39
Forum: Ask For Help
Topic: Question about Coord System Topic is solved
Replies: 12
Views: 2599

Re: Question about Coord System Topic is solved

if I'd seen this before and I'd have understood. This is easy, like 2+2
Image
by masheen
31 Mar 2018, 08:06
Forum: Ask For Help
Topic: Question about Coord System Topic is solved
Replies: 12
Views: 2599

Re: Question about Coord System Topic is solved

After you adjusted your diagram, your question will be as simple as: To rotate from currentAngle to desiredAngle, which way is shorter - turning right (clockwise = math neg) or turning left (from 0 towards 90, anti-clockwise, math pos)? Answer: ; use standard math Direction := +1 ; math pos = anti-...
by masheen
31 Mar 2018, 03:38
Forum: Ask For Help
Topic: Question about Coord System Topic is solved
Replies: 12
Views: 2599

Re: Question about Coord System Topic is solved

Please check the following angles: 0 degrees (= 0 radians) and 90 degrees (= Pi/2 radians). You will find that points on the x-axis like {x: 5, y: 0) have an angle of 0 degrees. You will also find that points on the y-axis like {x: 0, y: 5} or {x: 0, y: -5} have an angle of +/-90 degrees. Next: adj...
by masheen
31 Mar 2018, 01:48
Forum: Ask For Help
Topic: Question about Coord System Topic is solved
Replies: 12
Views: 2599

Re: Question about Coord System Topic is solved

Try with numbers from other quadrant also, Like dx=-3 and dy=+3 for example. Compare two points which both lie on the diagonal with slope of -1: (Angle in degrees = -45 or 135) ATan() goes between +90 and -90, and you seem to prefer 135 as result if possible, as far as I understand you. ; point in ...
by masheen
30 Mar 2018, 16:40
Forum: Ask For Help
Topic: Question about Coord System Topic is solved
Replies: 12
Views: 2599

Re: Question about Coord System Topic is solved

Look for this pattern: ATan(dy / dx) and replace with this: ATan2(dy, dx). Same result. If I misunderstood what is dx dy then I'm sorry, geometry I have trouble. dy := 5.2 dx := 7.9 MsgBox % ATan(dy / dx) ;0.582138 MsgBox % ATan2(dy, dx) ;0.582138 ATan2(y, x) { ; ATan() with correct sign static PI ...
by masheen
30 Mar 2018, 15:11
Forum: Ask For Help
Topic: Question about Coord System Topic is solved
Replies: 12
Views: 2599

Re: Question about Coord System Topic is solved

The problem lies within using the ATan() function, It does not do what you hope it to do. ATan() gives back value between -Pi/2 and +Pi/2. You need a function like ATan2() to get back a range from -Pi to +Pi. Check Wikipedia . ATan2(y, x) { ; ATan() with correct sign static PI := 4 * ATan(1) If (x ...
by masheen
30 Mar 2018, 14:00
Forum: Ask For Help
Topic: How to do ? -1 : 1 Topic is solved
Replies: 4
Views: 1244

Re: How to do ? -1 : 1 Topic is solved

jeeswg wrote:Like this?

Code: Select all

camRec3 := maxCamG / (2 * Pi) * (Atan((Y2 - Y1) / (X2 - X1)) + 3 * Pi / 2) - (X1 < X2 ? Pi : 0)
Thx
by masheen
30 Mar 2018, 12:57
Forum: Ask For Help
Topic: Question about Coord System Topic is solved
Replies: 12
Views: 2599

Question about Coord System Topic is solved

Hi I recently asked a question on the forum about how to get value1? https://autohotkey.com/boards/viewtopic.php?f=5&t=46216 https://i.imgur.com/n7axO2b.png Pi := 4 * Atan(1) ;3.14 maxCam := 4 * Atan(1) * 2 ;6.28 value1 := maxCam / (2 * Pi) * (Atan((Y2 - Y1) / (X2 - X1)) + 3 * Pi / 2) - (X1 < X2 ? -...
by masheen
30 Mar 2018, 11:57
Forum: Ask For Help
Topic: How to do ? -1 : 1 Topic is solved
Replies: 4
Views: 1244

How to do ? -1 : 1 Topic is solved

Hi how to do this expression one line. if (X1 < X2 ) { camRec3 := maxCamG / (2 * Pi) * (Atan((Y2 - Y1) / (X2 - X1)) + 3 * Pi / 2) - Pi }else{ camRec3 := maxCamG / (2 * Pi) * (Atan((Y2 - Y1) / (X2 - X1)) + 3 * Pi / 2) } dont work :( camRec3 := maxCamG / (2 * Pi) * (Atan((Y2 - Y1) / (X2 - X1)) + 3 * P...
by masheen
29 Mar 2018, 08:10
Forum: Ask For Help
Topic: The question is not on topic Topic is solved
Replies: 7
Views: 1852

Re: The question is not on topic Topic is solved

So it sounds like you need to find the angle between 5,10 and 20,20. Then you need to translate that geometric angle into the in-game camera angle -- this part we'd need details on. There are two different angles you may be working with. It depends on where the origin is. In Autohotkey using ImageS...
by masheen
28 Mar 2018, 04:47
Forum: Ask For Help
Topic: The question is not on topic Topic is solved
Replies: 7
Views: 1852

Re: The question is not on topic Topic is solved

Code: Select all

Random, var, 0, 255
MsgBox %var%
Or do you mean you want to know the Asc value of the character ? -- question mark?

Code: Select all

MsgBox % Asc("?")
Send {ASC 63}
by masheen
27 Mar 2018, 16:43
Forum: Ask For Help
Topic: The question is not on topic Topic is solved
Replies: 7
Views: 1852

Re: The question is not on topic Topic is solved

If something is not clear I can explain more details what I need.
by masheen
27 Mar 2018, 15:24
Forum: Ask For Help
Topic: The question is not on topic Topic is solved
Replies: 7
Views: 1852

The question is not on topic Topic is solved

Hi. My question is not quite on topic, but I'm sure that someone can help me. Someone who is well versed in geometry. I tried to draw as clear as possible. The question is what is equal to "?" from 0 to 255. I need a formula to calculate, can be directly in AHK code. If there's not enough data to ca...
by masheen
24 Mar 2018, 06:20
Forum: Ask For Help
Topic: GPU core count?
Replies: 1
Views: 649

GPU core count?

Hi, I know how to get CPU core count. EnvGet, coreCnt, NUMBER_OF_PROCESSORS MsgBox, % coreCnt Anybody know how to get GPU core count? UPD: I find one example but dont know how to get core count MsgBox, % Win32_VideoController() Win32_VideoController() { for objItem in ComObjGet("winmgmts:\\.\root\CI...

Go to advanced search