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));
```

Anybody know how to fix it?

- 15 Oct 2019, 07:31
- Forum: Ask For Help
- Topic: PostMessage MAKEWPARAM 5 param
- Replies:
**1** - Views:
**248**

Try to do this:

Code:
Get this:

Anybody know how to fix it?

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));
```

Anybody know how to fix it?

- 11 Apr 2018, 14:27
- Forum: Ask For Help
- Topic: Easy Questions about expressions Topic is solved
- Replies:
**8** - Views:
**1932**

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
}
}
```

- 06 Apr 2018, 02:31
- Forum: Ask For Help
- Topic: Questin about arrays
- Replies:
**1** - Views:
**570**

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...

- 04 Apr 2018, 06:11
- Forum: Ask For Help
- Topic: Question about Coord System Topic is solved
- Replies:
**12** - Views:
**2542**

It's a little different than what you showed, but thank you so much for the idea. Need AngleBetween * Direction.wolf_II wrote:After you adjuste...

- 01 Apr 2018, 09:54
- Forum: Ask For Help
- Topic: How to expresison on sting Topic is solved
- Replies:
**4** - Views:
**1220**

wrongRenz wrote:Try thisCode: Select all

`(result := (3.324 - 0.624) * 180 / Pi) > 180 ? result *= -1:""`

- 01 Apr 2018, 09:22
- Forum: Ask For Help
- Topic: How to expresison on sting Topic is solved
- Replies:
**4** - Views:
**1220**

How to do one line:
Dont work

Code: Select all

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

Code: Select all

```
result := (3.324 - 0.624) * 180 / Pi > 180 ? *-1 : *1
```

- 01 Apr 2018, 00:39
- Forum: Ask For Help
- Topic: Question about Coord System Topic is solved
- Replies:
**12** - Views:
**2542**

if I'd seen this before and I'd have understood. This is easy, like 2+2

- 31 Mar 2018, 08:06
- Forum: Ask For Help
- Topic: Question about Coord System Topic is solved
- Replies:
**12** - Views:
**2542**

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-...

- 31 Mar 2018, 03:38
- Forum: Ask For Help
- Topic: Question about Coord System Topic is solved
- Replies:
**12** - Views:
**2542**

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...

- 31 Mar 2018, 01:48
- Forum: Ask For Help
- Topic: Question about Coord System Topic is solved
- Replies:
**12** - Views:
**2542**

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 ...

- 30 Mar 2018, 16:40
- Forum: Ask For Help
- Topic: Question about Coord System Topic is solved
- Replies:
**12** - Views:
**2542**

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 ...

- 30 Mar 2018, 15:11
- Forum: Ask For Help
- Topic: Question about Coord System Topic is solved
- Replies:
**12** - Views:
**2542**

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 ...

- 30 Mar 2018, 14:00
- Forum: Ask For Help
- Topic: How to do ? -1 : 1 Topic is solved
- Replies:
**4** - Views:
**1218**

Thxjeeswg wrote:Like this?Code: Select all

`camRec3 := maxCamG / (2 * Pi) * (Atan((Y2 - Y1) / (X2 - X1)) + 3 * Pi / 2) - (X1 < X2 ? Pi : 0)`

- 30 Mar 2018, 12:57
- Forum: Ask For Help
- Topic: Question about Coord System Topic is solved
- Replies:
**12** - Views:
**2542**

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 ? -...

- 30 Mar 2018, 11:57
- Forum: Ask For Help
- Topic: How to do ? -1 : 1 Topic is solved
- Replies:
**4** - Views:
**1218**

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...

- 29 Mar 2018, 08:10
- Forum: Ask For Help
- Topic: The question is not on topic Topic is solved
- Replies:
**7** - Views:
**1809**

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...

- 28 Mar 2018, 04:47
- Forum: Ask For Help
- Topic: The question is not on topic Topic is solved
- Replies:
**7** - Views:
**1809**

Code: Select all

```
Random, var, 0, 255
MsgBox %var%
```

Code: Select all

```
MsgBox % Asc("?")
Send {ASC 63}
```

- 27 Mar 2018, 16:43
- Forum: Ask For Help
- Topic: The question is not on topic Topic is solved
- Replies:
**7** - Views:
**1809**

If something is not clear I can explain more details what I need.

- 27 Mar 2018, 15:24
- Forum: Ask For Help
- Topic: The question is not on topic Topic is solved
- Replies:
**7** - Views:
**1809**

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...

- 24 Mar 2018, 06:20
- Forum: Ask For Help
- Topic: GPU core count?
- Replies:
**1** - Views:
**633**

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...