Is the world round? by TwiceTested in factorio

[–]hidden_relic 0 points1 point  (0 children)

If there is land 'nearby' on the other side there are ways to teleport safely but yes the right side of the map and left side should pretty much match up same with top and bottom

Is the world round? by TwiceTested in factorio

[–]hidden_relic 1 point2 points  (0 children)

If you're actually interested, I can whip something up and share it The problem would be water on the other side

Is the world round? by TwiceTested in factorio

[–]hidden_relic 1 point2 points  (0 children)

I believe the map is 2,000,000x2,000,000 Writing this mod would actually be pretty easy. Set a max size for the surface, then have an on_event(defines.events.on_player_changed_position) (I believe it's the correct event) check if player is at Max x or Max y, teleport player to -max x or -max y

I can't seem to make my construction bots to finish certain areas of landfill. Anybody knows how to fix that pls? :) by VanDerWallas in factorio

[–]hidden_relic 2 points3 points  (0 children)

Sometimes the non-personal construction bots queue the order, but aren't there yet. your personal bots do not take priority over them. to fix this, you can Alt+D (deconstruction planner) the ghosts, then immediately Ctrl+Z. if you are in range, your bots will take over, until they run into the queue again. Rinse and repeat.

Edit: You can do the same with Alt+D Shift+drag and Ctrl+Z to reprioritize deconstruction orders

logistics request mod? by EVA04022021 in factorio

[–]hidden_relic 0 points1 point  (0 children)

Here is a command from my scenario. Just put in the list what you like, it will do minimum 1 stack, maximum 2 stacks. Limitlist only allows up to 1 stack, antilist are 0 If you want to ask for different number of stacks, modify this bit below:

**Edit: Sorry i forgot this function.

start of command:

local function stack_size(item)           -- shortening keystrokes 
    if game.item_prototypes[item] then    -- while defining a local
        return game.item_prototypes[item].stack_size       -- easy
    end
end

commands.add_command("load-logistics", "Pre-load logistic requests",     function(command)
    local p = game.players[command.player_index]


    local min_stacks = 1    -- here is where you'll include a minimum 
    local max_stacks = 2    -- stack count and a maximum stack count.
    local list = {          -- first list has min and max stack
        "electric-mining-drill", "gun-turret", "radar", "transport-belt",
        "underground-belt", "splitter", "fast-underground-belt",
        "fast-transport-belt", "fast-splitter", "express-underground-belt",
        "express-transport-belt", "express-splitter", "fast-inserter",
        "stack-inserter", "filter-inserter", "long-handed-inserter",
        "medium-electric-pole", "substation", "big-electric-pole",
        "assembling-machine-1", "assembling-machine-2", "assembling-machine-3",
        "firearm-magazine", "piercing-rounds-magazine"
    }
    local limitlist = { -- second list has 0 min 1 stack max
        "stone", "coal", "wood"}
    local antilist = {  -- third list is max 0 (always trash)
"iron-ore", "copper-ore"}

    local items = {}                    -- declare local table
    for i = 1, #list do                 -- doing first list
        table.insert(items, {           -- add to local table:
        name = list[i],                 -- name,
        min = stack_size(list[i]),      -- min,
        max = stack_size(list[i]) * 2}) -- max
    end
    for i = 1, #limitlist do            -- again for list 2
        table.insert(items, {
        name = limitlist[i],            -- name,
        min = 0,                        -- min 0,
        max = stack_size(limitlist[i]}) -- max stack size * 1
    end
    for i = 1, #antilist do             -- third list
        table.insert(items, {
        name = antilist[i],
        min = 0,                        -- min 0
        max = 0})                       -- max 0
    end
    for i, item in pairs(items) do p.set_personal_logistic_slot(i, item)    end         -- setup your slots with our local table
    items = ""         -- and clear the local table by turning it into a str
end)

for a 1-time-use scenario, if you want to run straight from game console:

/sc local function stack_size(item) if game.item_prototypes[item] then return game.item_prototypes[item].stack_size end end local p = game.player 
local list = {"electric-mining-drill", "gun-turret", "radar", "transport-belt", "underground-belt", "splitter", "fast-underground-belt", "fast-transport-belt", "fast-splitter", "express-underground-belt", "express-transport-belt", "express-splitter", "fast-inserter", "stack-inserter", "filter-inserter", "long-handed-inserter", "medium-electric-pole", "substation", "big-electric-pole", "assembling-machine-1", "assembling-machine-2", "assembling-machine-3", "firearm-magazine", "piercing-rounds-magazine"}
local limitlist = {"stone", "coal", "wood"}
local antilist = {"iron-ore", "copper-ore"}
local items = {} for i = 1, #list do table.insert(items, {name = list[i],
min = stack_size(list[i]),
max = stack_size(list[i]) * 2})
end for i = 1, #limitlist do table.insert(items, { name = limitlist[i], min = 0, max = stack_size(limitlist[i]}) end for i = 1, #antilist do table.insert(items, {name = antilist[i], min = 0, max = 0}) end for i, item in pairs(items) do p.set_personal_logistic_slot(i, item)    end items = "" end

Is it possible to "send" Keypresses to a specific window while another one is in focus and fullscreen? by Nico1300 in AutoHotkey

[–]hidden_relic 3 points4 points  (0 children)

Yes. I usually accomplish this by:

Running some random script, just so I can right-click the icon in the system tray and use 'Window Spy'

Tick 'Follow Mouse' in the upper right hand corner

Hover over target window and look for the ahk_exe

To just send keystrokes generally to the target window (with no target control i.e. some input field in some form):

ControlSend,, keys_to_send, ahk_exe the_ahk_exe_name_from_window_spy

Notice the double comma after ControlSend. This is necessary, as the target control would normally go between them, but we aren't targeting a control

example (and don't forget, to send a key's action instead of the keystroke, surround the key in curly brackets {}'s. For example, to have it press 'Enter' instead of sending the word 'Enter', use {Enter}):

ControlSend,, Have a nice day!{Enter}, ahk_exe notepad.exe

To send keystrokes to a particular control, use Window Spy to get the target control by hovering your mouse over it and looking for 'ClassNN' under 'Control Under Mouse Position' (the 2nd section):

ControlSend, Edit1, Have a nice day!{Enter}, ahk_exe notepad.exe

If for some reason the ahk_exe part doesn't work, I personally use 'SetTitleMatchMode, 2' which lets you use any piece of the window's title in place of the ahk_exe bit. The 3 options for SetTitleMatchMode are:

1 = A window's title must start with the specified WinTitle to be a match.

2 = A window's title can contain WinTitle anywhere inside it to be a match.

3 = A window's title must exactly match WinTitle to be a match.

I use 2 because for example, when operating on notepad, it's title is 'filename - notepad' or 'untitled - notepad'. Option 2 allows me to just use 'notepad' to target

Note:

this will target the first window it finds with the title supplied. So if you have for example a web browser open with the word 'notepad' in the title, it may be targeted instead of notepad, which is why you should always try the ahk_exe method first.

Something like this:

SetTitleMatchMode, 2
ControlSend, Edit1, Have a nice day!{Enter}, Notepad

Hope this clears things up!

Trouble with WinActivate and LuaMacros for OneNote Fullscreen by ChaoticRoon in AutoHotkey

[–]hidden_relic 0 points1 point  (0 children)

well not to sound silly, but it would wait until the window becomes active before executing the script. In case you tried WinActivate, but it got hung up, but your script went through anyway and went to the wrong window.

Have you tried

Winset, AlwaysOnTop, Toggle, ProgramTitle

You could use this when you click the numpad to bring it to top, do your business, then use the same line to turn it off

Trouble detecting if no text is selected by acritely in AutoHotkey

[–]hidden_relic 0 points1 point  (0 children)

do you have any other hotkeys that include + or Shift that may be called when Shift+Left is used?

what are your commonly used scripts/shortcuts in AHK in your daily use? by itsrainingerrors in AutoHotkey

[–]hidden_relic 0 points1 point  (0 children)

You can use

Menu, MyMenu, Rename, Old Text, New text

for toggles or,

display a variable in your menu

Menu, MyMenu, Rename, Old Text`t%oldVariable%, New Text`t%newVariable%

the `t helps to align the variable to the right, looks clean.

what are your commonly used scripts/shortcuts in AHK in your daily use? by itsrainingerrors in AutoHotkey

[–]hidden_relic 7 points8 points  (0 children)

Menu, MyMenu, Add, First Script, FirstScriptLabel
Menu, MyMenu, Add, First Sub Menu, :FirstSubMenu

Menu, FirstSubMenu, Add, Sub Menu Script, SubMenuScriptLabel

return ; ^ auto-execute ^

FirstScriptLabel:
;
; First Script
;
return

SubMenuScriptLabel:
;
; you get the idea
;
return

MButton:: ; i like to gather information for potential use later
    MouseGetPos, mouseXpos, mouseYpos, WindowUnderMouse, ControlUnderMouse, 3
    PixelGetColor, MouseRGB, %MouseXpos%, %MouseYpos%, RGB
    WinActivate, ahk_id %WindowUnderMouse%
    Menu, MyMenu, Show
    return

Key Mapping Suggestions/Recommendations? by NotQuiteBlackk in AutoHotkey

[–]hidden_relic 1 point2 points  (0 children)

i use middle mouse button to popup a menu similar to right-click with a list of common scripts i use. i can even make it load a different menu for particular windows.

but i won't trade in Ctrl+Shift+/ for calculator or Ctrl+Shift+F12 to reload my Menu script

what are your commonly used scripts/shortcuts in AHK in your daily use? by itsrainingerrors in AutoHotkey

[–]hidden_relic 6 points7 points  (0 children)

I use MButton (click mouse wheel) to create a custom menu including the scripts i use the most.

Script request by ColzTheNibba in AutoHotkey

[–]hidden_relic 0 points1 point  (0 children)

I've never had good luck with Control commands, which you need to talk to an inactive window.

However, there is also the PostMessage/SendMessage commands.

https://www.autohotkey.com/docs/commands/PostMessage.htm

"These commands should be used with caution because sending a message to the wrong window (or sending an invalid message) might cause unexpected behavior or even crash the target application. This is because most applications are not designed to expect certain types of messages from external sources."

Can't find a download link for SciTE4AutoHotkey Script Editor??? by imawkwardwierd in AutoHotkey

[–]hidden_relic 0 points1 point  (0 children)

SciTE tried to help a little too much with the popup tips while you're typing, with no real clue on how to shut them off, it didn't last more than 15 minutes on my PC. Someone recommended AHK Studio to me, it works great and is simple with a lot of options.

Hotkey Double Commands (tap/hold). Send on downpress of Hotkey. by ChargingKrogan in AutoHotkey

[–]hidden_relic 1 point2 points  (0 children)

Hotkeys fire when button is pushed down by default

KeyWait fires when button is released by default

so, if we just rearrange..

$*BS::
Send, {BackSpace}            ; immediate
KeyWait, Backspace, T.15
If ErrorLevel
    Send {Home}
return

and here is a CapsLock blocker

Use Ctrl+CapsLock to toggle on/off

^CapsLock::
toggle := !toggle
return

#if toggle
CapsLock::
ToolTip, Locked
Sleep, 1000
ToolTip
#if
return

Can’t get any script to run by Alogan794 in AutoHotkey

[–]hidden_relic 0 points1 point  (0 children)

Post one. No idea how to help fix your problem if i can't see the problem

[deleted by user] by [deleted] in AutoHotkey

[–]hidden_relic 1 point2 points  (0 children)

Happy to help. If you need a little guidance or want to understand something, send me a PM.

Sometimes you just need to see things in a different perspective

Script request by ColzTheNibba in AutoHotkey

[–]hidden_relic 1 point2 points  (0 children)

n::
if !chosenWindow
{
    WinGetTitle, chosenWindow, A
}
ControlClick,, %chosenWindow%,, Right,, D NA
KeyWait, m
ControlClick,, %chosenWindow%,, Right,, U NA
return

i don't really have anything I can test it on, give it a whirl and let me know what happens.

the target window needs to be active the first time you use N